summaryrefslogtreecommitdiff
path: root/media-video/motion/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-18 10:12:16 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-18 10:12:16 +0100
commit8ea6e43d2f65acbfda614dbd4635823d7605b6d8 (patch)
tree06f832bd17f7282b5cd87dbec9f023e550afcc04 /media-video/motion/files
parent75b7b7da41881995754ded71c9c029cb1686096d (diff)
gentoo auto-resync : 18:05:2023 - 10:12:16
Diffstat (limited to 'media-video/motion/files')
-rw-r--r--media-video/motion/files/motion.initd-r512
-rw-r--r--media-video/motion/files/motion.service-r41
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