summaryrefslogtreecommitdiff
path: root/media-video/motion/files/motion.initd-r5
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
commitab3da91fb6c91a9df52fff8f991570f456fd3c7a (patch)
treee8f3bfa2c6c3d20ec3b9c352c839e23949068b6b /media-video/motion/files/motion.initd-r5
parent6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (diff)
gentoo resync : 18.12.2020
Diffstat (limited to 'media-video/motion/files/motion.initd-r5')
-rw-r--r--media-video/motion/files/motion.initd-r537
1 files changed, 37 insertions, 0 deletions
diff --git a/media-video/motion/files/motion.initd-r5 b/media-video/motion/files/motion.initd-r5
new file mode 100644
index 000000000000..b13ac5d0b5b7
--- /dev/null
+++ b/media-video/motion/files/motion.initd-r5
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+: ${MOTION_USER:="motion"}
+: ${MOTION_GROUP:="motion"}
+
+[ "${MOTION_UMASK}" ] && umask="${MOTION_UMASK}"
+[ "${MOTION_CONFIGFILE}" ] && command_args="-c ${MOTION_CONFIGFILE}"
+[ "${MOTION_LOGFILE}" ] && command_args="${command_args} -l ${MOTION_LOGFILE}"
+[ "${MOTION_LOGTYPE}" ] && command_args="${command_args} -k ${MOTION_LOGTYPE}"
+[ "${MOTION_LOGLEVEL}" ] && command_args="${command_args} -d ${MOTION_LOGLEVEL}"
+
+command=/usr/bin/motion
+command_user="${MOTION_USER}:${MOTION_GROUP}"
+
+start_pre() {
+ if [ "${MOTION_DIR}" ] ; then
+ checkpath -d -o "${MOTION_USER}":"${MOTION_GROUP}" "${MOTION_DIR}"
+ directory="${MOTION_DIR}"
+ fi
+ if [ "${MOTION_LOGFILE}" ] ; then
+ checkpath -f -o "${MOTION_USER}":"${MOTION_GROUP}" "${LOGFILE}"
+ fi
+ if [ "${MOTION_PIDFILE}" ] ; then
+ pidfile="${MOTION_PIDFILE}"
+ command_background=true
+ else
+ supervisor=supervise-daemon
+ fi
+}
+
+depend() {
+ need localmount
+ after bootmisc
+ use mysql postgresq
+}