diff options
Diffstat (limited to 'media-video/motion/files/motion.initd-r5')
-rw-r--r-- | media-video/motion/files/motion.initd-r5 | 12 |
1 files changed, 12 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 $? +} |