diff options
author | Alex Suykov <alex.suykov@gmail.com> | 2015-05-23 13:14:18 +0300 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-07-13 22:43:39 +0200 |
commit | 2bdbcb8ada7c48f4e9a19b57053ccda0043b6dea (patch) | |
tree | db00103006ff1a9f95584d9c16b95c1dc2dd931a /package/supervisor | |
parent | 40f8062ad0f8be911ba067faf99e4081d0a5a05d (diff) |
supervisor: systemd support
Running supervisord under systemd sounds wrong, but it is possible
and probably makes sense in some cases.
[Thomas: use relative symbolic link instead of an absolute symbolic
link.]
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/supervisor')
-rw-r--r-- | package/supervisor/supervisor.mk | 8 | ||||
-rw-r--r-- | package/supervisor/supervisord.service | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/package/supervisor/supervisor.mk b/package/supervisor/supervisor.mk index 6bd64a9a2..a6a4731c8 100644 --- a/package/supervisor/supervisor.mk +++ b/package/supervisor/supervisor.mk @@ -22,4 +22,12 @@ define SUPERVISOR_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S99supervisord endef +define SUPERVISOR_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/supervisor/supervisord.service \ + $(TARGET_DIR)/usr/lib/systemd/system/supervisord.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/supervisord.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/supervisord.service +endef + $(eval $(python-package)) diff --git a/package/supervisor/supervisord.service b/package/supervisor/supervisord.service new file mode 100644 index 000000000..92c38c7d1 --- /dev/null +++ b/package/supervisor/supervisord.service @@ -0,0 +1,10 @@ +[Unit] +Description=Process Control System +After=syslog.target + +[Service] +ExecStart=/usr/bin/supervisord -n +Restart=always + +[Install] +WantedBy=multi-user.target |