diff options
author | Nuno Silva <nuno.m.ribeiro.silva@tecnico.ulisboa.pt> | 2023-05-07 20:05:30 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2023-05-18 10:21:06 +0300 |
commit | 8144269da4c02992ba1b96425eaeb7cc4db0174e (patch) | |
tree | 5ddbb5163939ae1ac95dcb97c7d4f5d824649cf8 /media-video/motion | |
parent | media-libs/tg_owt: add missing BDEPEND for xorg-proto (diff) | |
download | gentoo-8144269da4c02992ba1b96425eaeb7cc4db0174e.tar.gz gentoo-8144269da4c02992ba1b96425eaeb7cc4db0174e.tar.bz2 gentoo-8144269da4c02992ba1b96425eaeb7cc4db0174e.zip |
media-video/motion: add reload support to init.d and service
Signed-off-by: Nuno Silva <nuno.m.ribeiro.silva@tecnico.ulisboa.pt>
Closes: https://github.com/gentoo/gentoo/pull/30920
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-video/motion')
-rw-r--r-- | media-video/motion/files/motion.initd-r5 | 12 | ||||
-rw-r--r-- | media-video/motion/files/motion.service-r4 | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/media-video/motion/files/motion.initd-r5 b/media-video/motion/files/motion.initd-r5 index 315bda6c2e7f..4d7b43af585b 100644 --- a/media-video/motion/files/motion.initd-r5 +++ b/media-video/motion/files/motion.initd-r5 @@ -13,6 +13,8 @@ command=/usr/bin/motion command_user="${MOTION_USER}:${MOTION_GROUP}" +extra_started_commands="reload" +description_reload="Reread the config file" start_pre() { if [ "${MOTION_DIR}" ] ; then @@ -35,3 +37,13 @@ depend() { after bootmisc use mysql postgresq } + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + if [ "${MOTION_PIDFILE}" ] ; then + start-stop-daemon --signal SIGHUP --pidfile "${MOTION_PIDFILE}" + else + supervise-daemon ${RC_SVCNAME} --signal SIGHUP + fi + eend $? +} diff --git a/media-video/motion/files/motion.service-r4 b/media-video/motion/files/motion.service-r4 index 1564fb2699c4..66143f0e204b 100644 --- a/media-video/motion/files/motion.service-r4 +++ b/media-video/motion/files/motion.service-r4 @@ -13,6 +13,7 @@ Documentation=man:motion(1) Type=simple ExecStart=/usr/bin/motion -n -c /etc/motion/motion.conf StandardError=null +ExecReload=/bin/kill -HUP $MAINPID User=motion Group=motion |