diff options
author | Hans Fernhout <hfern@fernhout.info> | 2020-06-04 10:09:24 +0300 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2020-06-04 10:14:12 +0300 |
commit | 58c1002e91e59ca9edba1a4781f3024b0dbdf99e (patch) | |
tree | e78f9bfa6d503ce1676adbecc943948a36689a21 /media-video/motion/files | |
parent | acct-user/motion: new GLEP-81 package (diff) | |
download | gentoo-58c1002e91e59ca9edba1a4781f3024b0dbdf99e.tar.gz gentoo-58c1002e91e59ca9edba1a4781f3024b0dbdf99e.tar.bz2 gentoo-58c1002e91e59ca9edba1a4781f3024b0dbdf99e.zip |
media-video/motion: version bump to 4.3.1
Summary of changes:
- support new version 4.3.1
- EAPI6 to EAPI7
- GLEP81 support: user and group management via dedicated packages
- untangled support for mariadb and mysql
- remove libav
- confd support for commandline options, umask and work dir
- initd checkpre function to check existence of work dir and log dir
- support for OpenRC's supervise-daemon via a local use flag
- added myself as proxy-maintainer
Closes: https://bugs.gentoo.org/665930
Closes: https://bugs.gentoo.org/673410
Closes: https://bugs.gentoo.org/717312
Signed-off-by: Johannes Willem Fernhout <hfern@fernhout.info>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-video/motion/files')
-rw-r--r-- | media-video/motion/files/motion.confd-r4 | 28 | ||||
-rw-r--r-- | media-video/motion/files/motion.initd-r4 | 30 | ||||
-rw-r--r-- | media-video/motion/files/motion.service | 4 | ||||
-rw-r--r-- | media-video/motion/files/motion.service-r4 | 26 |
4 files changed, 86 insertions, 2 deletions
diff --git a/media-video/motion/files/motion.confd-r4 b/media-video/motion/files/motion.confd-r4 new file mode 100644 index 000000000000..8a200d14928c --- /dev/null +++ b/media-video/motion/files/motion.confd-r4 @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# Motion OpenRC conf.d file +# All settings are optional + +# Set the user and group under which motion will be run +#MOTION_USER="motion" +#MOTION_GROUP="motion" + +#Set motion's config file: +#MOTION_CONFIGFILE="/etc/motion/motion.conf" + +#Set motion's log file. Leave unset for syslog: +#MOTION_LOGFILE="/var/log/motion/motion.log" + +#Set log type: 1-9 for COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL +#MOTION_LOGTYPE="9" + +#Set log level: 1-9 for EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL +#MOTION_LOGLEVEL="6" + +#Set a default dir where motion places its output +#MOTION_DIR="/var/lib/motion" + +#Set the umask for the output files, for additonal security +#MOTION_UMASK="007" + diff --git a/media-video/motion/files/motion.initd-r4 b/media-video/motion/files/motion.initd-r4 new file mode 100644 index 000000000000..30d5e25cb08e --- /dev/null +++ b/media-video/motion/files/motion.initd-r4 @@ -0,0 +1,30 @@ +#!/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 + mkdir -p "${MOTION_DIR}" + checkpath -d -o "${MOTION_USER}" "${MOTION_DIR}" + directory="${MOTION_DIR}" + fi + if [ "${MOTION_LOGFILE}" ] ; then + local LOGFILE=${MOTION_LOGFILE##*/} + local LOGDIR=${MOTION_LOGFILE%$LOGFILE} + mkdir -p "${LOGDIR}" + checkpath -d -o "${MOTION_USER}" "${LOGDIR}" + fi +} + diff --git a/media-video/motion/files/motion.service b/media-video/motion/files/motion.service index 559b94b6b29a..d4755bdb48ea 100644 --- a/media-video/motion/files/motion.service +++ b/media-video/motion/files/motion.service @@ -8,13 +8,13 @@ Type=simple ExecStart=/usr/bin/motion -n -c /etc/motion/motion.conf StandardError=null -User=motion +#User=motion Group=video #RuntimeDirectory=motion #RuntimeDirectoryMode=0750 -WorkingDirectory=/var/lib/motion +#WorkingDirectory=/var/lib/motion [Install] WantedBy=multi-user.target diff --git a/media-video/motion/files/motion.service-r4 b/media-video/motion/files/motion.service-r4 new file mode 100644 index 000000000000..1564fb2699c4 --- /dev/null +++ b/media-video/motion/files/motion.service-r4 @@ -0,0 +1,26 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# Motion OpenRC systemd service file + + +[Unit] +Description=Motion detection daemon +After=local-fs.target network.target +Documentation=man:motion(1) + +[Service] +Type=simple +ExecStart=/usr/bin/motion -n -c /etc/motion/motion.conf +StandardError=null + +User=motion +Group=motion + +UMask=007 +WorkingDirectory=-/var/lib/motion + + +[Install] +WantedBy=multi-user.target + |