"Fossies" - the Fresh Open Source Software Archive

Member "motion-Release-4.3.0/data/motion.service.in" (14 Jan 2020, 2646 Bytes) of package /linux/misc/motion-Release-4.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #
    2 # This systemd unit file is part of the motion project:
    3 #
    4 # https://motion-project.github.io/
    5 #
    6 # This program is free software: you can redistribute it and/or modify
    7 # it under the terms of version 2 of the GNU General Public License as
    8 # published by the Free Software Foundation.
    9 #
   10 # This program is distributed in the hope that it will be useful,
   11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
   12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13 # GNU General Public License for more details.
   14 #
   15 # You should have received a copy of the GNU Lesser General Public
   16 # License along with this program.  If not, see
   17 # <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
   18 #
   19 
   20 [Unit]
   21 Description=Motion - monitor live video, trigger responses, record video/stills.
   22 Documentation=man:motion(1)
   23 After=local-fs.target network.target
   24 
   25 [Service]
   26 User=motion
   27 EnvironmentFile=-/etc/default/motion
   28 # The the sleep on the following line is needed with systemd version
   29 # 232, otherwise the error message that we echo doesn't hit 'systemctl
   30 # status'.
   31 ExecStart=/bin/sh -c '([ -r "/etc/default/motion" ] && [ "x$start_motion_daemon" != "xyes" ]) && echo "Not starting motion because start_motion_daemon=$start_motion_daemon - check /etc/default/motion" && sleep 1 && exit 78 ; exec @BIN_PATH@/motion -n'
   32 Type=simple
   33 # Set StandardError=journal to use journald to log messages from motion.
   34 # See also the "log_file" config file option in motion(1) and
   35 # systemd.service(5).
   36 StandardError=null
   37 ExecReload=@KILL@ -HUP $MAINPID
   38 Restart=on-failure
   39 RestartSec=5
   40 # Don't restart if unconfigured / misconfigured  e.g. daemon disabled
   41 # in defaults file.  See also /usr/include/sysexits.h or sysexits(3)
   42 RestartPreventExitStatus=78
   43 # To tune restart behaviour, see systemd.unit(5) and use
   44 # "systemctl edit motion" to change the following settings:
   45 #StartLimitBurst=
   46 #StartLimitIntervalSec=
   47 #StartLimitAction=
   48 #FailureAction=
   49 # The following can be used to increase the security of the
   50 # installation, by mitigating risk from attacks on motion and the
   51 # binaries, libraries and scripts which it relies on.  They are disabled
   52 # by default in case they break existing installations, e.g. those which
   53 # call site-local scripts which would inherit the same restrictions.
   54 #
   55 # See systemd.exec(5) and
   56 # http://0pointer.net/public/systemd-nluug-2014.pdf for more details
   57 # of these and other related options.
   58 #
   59 # Use "systemctl edit motion" to change these settings.
   60 #PrivateTmp=true
   61 #NoNewPrivileges=yes
   62 #PrivateNetwork=yes
   63 #ProtectHome=yes
   64 #DeviceAllow=/dev/video0
   65 #MountFlags=slave
   66 #SystemCallFilter=
   67 
   68 [Install]
   69 WantedBy=multi-user.target