summaryrefslogtreecommitdiff
path: root/Services/SystemServer/Service.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-05-27 00:41:01 +0300
committerAndreas Kling <kling@serenityos.org>2020-05-27 11:19:38 +0200
commit856e4853f49b2e95187cd0d030a36a1057454f8e (patch)
tree5e8b747dc35591a7991973f5710d9fe5a0d20f86 /Services/SystemServer/Service.h
parentdf128821b2ca675a47a86439f1fd0ad33bed737e (diff)
downloadserenity-856e4853f49b2e95187cd0d030a36a1057454f8e.zip
SystemServer: Add BootModes and Environment service options
SystemServer will now look at the boot mode, as specified on the kernel command line, and only launch the services configured for that boot mode.
Diffstat (limited to 'Services/SystemServer/Service.h')
-rw-r--r--Services/SystemServer/Service.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/Services/SystemServer/Service.h b/Services/SystemServer/Service.h
index de408ec04d..b7cf1679a5 100644
--- a/Services/SystemServer/Service.h
+++ b/Services/SystemServer/Service.h
@@ -36,6 +36,7 @@ class Service final : public Core::Object {
C_OBJECT(Service)
public:
+ bool is_enabled() const;
void activate();
void did_exit(int exit_code);
@@ -68,6 +69,12 @@ private:
uid_t m_uid { 0 };
gid_t m_gid { 0 };
Vector<gid_t> m_extra_gids;
+ // The working directory in which to spawn the service.
+ String m_working_directory;
+ // Boot modes to run this service in. By default, this is the graphical mode.
+ Vector<String> m_boot_modes;
+ // Environment variables to pass to the service.
+ Vector<String> m_environment;
// PID of the running instance of this service.
pid_t m_pid { -1 };
@@ -81,9 +88,6 @@ private:
// times where it has exited unsuccessfully and too quickly.
int m_restart_attempts { 0 };
- // The working directory in which to spawn the service
- String m_working_directory;
-
void resolve_user();
void setup_socket();
void setup_notifier();