[lxc-devel] [lxcfs/master] config: Adds reload mode to sysvinit and systemd scripts.
tomponline on Github
lxc-bot at linuxcontainers.org
Tue Jan 22 14:24:46 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 400 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190122/23ee8722/attachment.bin>
-------------- next part --------------
From 951a915f4b8fc6a265a3bd592f4a053dc00c2656 Mon Sep 17 00:00:00 2001
From: tomponline <tomp at tomp.uk>
Date: Tue, 22 Jan 2019 14:23:05 +0000
Subject: [PATCH] config: Adds reload mode to sysvinit and systemd scripts.
To to close down https://github.com/lxc/lxcfs/pull/188
Signed-off-by: tomponline <tomp at tomp.uk>
---
config/init/systemd/lxcfs.service | 1 +
config/init/sysvinit/lxcfs | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/config/init/systemd/lxcfs.service b/config/init/systemd/lxcfs.service
index 95e3ee9..af20e5a 100644
--- a/config/init/systemd/lxcfs.service
+++ b/config/init/systemd/lxcfs.service
@@ -10,6 +10,7 @@ KillMode=process
Restart=on-failure
ExecStopPost=-/bin/fusermount -u /var/lib/lxcfs
Delegate=yes
+ExecReload=/bin/kill -USR1 $MAINPID
[Install]
WantedBy=multi-user.target
diff --git a/config/init/sysvinit/lxcfs b/config/init/sysvinit/lxcfs
index bdbcb34..4061b48 100755
--- a/config/init/sysvinit/lxcfs
+++ b/config/init/sysvinit/lxcfs
@@ -83,6 +83,13 @@ case "$1" in
status_of_proc -p ${PIDFILE} "${DAEMON}" lxcfs
;;
+ reload)
+ if init_is_upstart; then
+ exit 1
+ fi
+ kill -USR1 $(cat ${PIDFILE})
+ ;;
+
restart|force-reload)
if init_is_upstart; then
exit 1
More information about the lxc-devel
mailing list