Bugs: mailto:marillat@deb-multimedia.org
Homepage: https://github.com/ccrisan/motioneye
X-Python-Version: >= 2.7
-Standards-Version: 4.1.4
+Standards-Version: 3.9.8
Build-Depends: debhelper (>= 11), python | python-all | python-dev | python-all-dev,
- dh-python
+ dh-python, python-jsmin, python-cssmin, fontmake, fontforge-nox, gmsl
Package: motioneye
Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, libjs-jquery, libjs-jquery-mousewheel, python-tornado, python-jinja2, python-pil, python-pycurl, python-pkg-resources, lsb-base
+Depends: ${python:Depends}, ${misc:Depends}, adduser, libjs-jquery, libjs-jquery-mousewheel, python-tornado, python-jinja2, python-pil, python-pycurl, python-pkg-resources, lsb-base
Suggests: motion, ffmpeg, v4l-utils
Description: web-based frontend for motion
- A web frontend for the motion daemon, written in Python.
+ A web frontend for the motion daemon, written in Python:
+ - web-based, mobile/tablet-friendly user interface
+ - compatible with most USB cameras and the Raspberry PI camera module
+ - support for IP (network) cameras
+ - motion detection with email notifications and working schedule
+ - JPEG files for still images, AVI files for videos
+ - timelapse movies
+ - uploading media files to Google Drive and Dropbox
NAME="motioneye"
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
-DAEMON="/usr/local/bin/meyectl"
-PIDFILE="/var/run/$NAME.pid"
+DAEMON="/usr/bin/meyectl"
+RUNDIR="/var/run/$NAME"
+PIDFILE="$RUNDIR/$NAME.pid"
DESC="motionEye server"
-USER="root"
+USER="motioneye"
OPTIONS="startserver -c /etc/motioneye/motioneye.conf -l -b"
. /lib/lsb/init-functions
case "$1" in
start)
+ if [ ! -d "$RUNDIR" ]; then
+ mkdir -p "$RUNDIR"
+ fi
+ chown $USER "$RUNDIR"
log_daemon_msg "Starting $DESC"
if start-stop-daemon --start --oknodo --exec $DAEMON --chuid $USER -- $OPTIONS; then
log_end_msg 0
--- /dev/null
+Description: Use private log and run directories
+Last-Update: 2018-06-04
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: motioneye-dmo-0.39/extra/motioneye.conf.sample
+===================================================================
+--- motioneye-dmo-0.39.orig/extra/motioneye.conf.sample 2018-06-04 10:20:43.710359615 +0200
++++ motioneye-dmo-0.39/extra/motioneye.conf.sample 2018-06-04 10:20:43.706359602 +0200
+@@ -3,10 +3,10 @@
+ conf_path /etc/motioneye
+
+ # path to the directory where pid files go (must be writable by motionEye)
+-run_path /var/run
++run_path /var/run/motioneye
+
+ # path to the directory where log files go (must be writable by motionEye)
+-log_path /var/log
++log_path /var/log/motioneye
+
+ # default output path for media files (must be writable by motionEye)
+ media_path /var/lib/motioneye
+Index: motioneye-dmo-0.39/extra/motioneye.systemd-unit
+===================================================================
+--- motioneye-dmo-0.39.orig/extra/motioneye.systemd-unit 2018-03-31 22:21:38.000000000 +0200
++++ motioneye-dmo-0.39/extra/motioneye.systemd-unit 2018-06-04 10:22:57.514714185 +0200
+@@ -3,6 +3,8 @@
+
+ [Service]
+ ExecStart=/usr/bin/meyectl startserver -c /etc/motioneye/motioneye.conf
++User=motioneye
++RuntimeDirectory=motioneye
+ Restart=on-abort
+
+ [Install]
--- /dev/null
+add_private_log_and_run_dirs
--- /dev/null
+#!/bin/sh
+# postinst script for motioneye
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+case "$1" in
+
+ configure)
+ # Create motioneye account and add to 'video' group
+ adduser --system --home /var/lib/motioneye motioneye
+ usermod --append --groups video motioneye
+
+ # Fix directory ownership
+ chown motioneye /var/lib/motioneye
+ chown motioneye /var/log/motioneye
+ chown motioneye /etc/motioneye
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ exit 0
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+db_stop
+
+exit 0