Send Motion-user mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: motion daemon not starting (Terry Parker)
   2. Re: motion daemon not starting (Dougie Nisbet)


----------------------------------------------------------------------

Message: 1
Date: Wed, 16 May 2018 01:26:15 -0500
From: Terry Parker <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] motion daemon not starting
Message-ID:
        <CAErB2=JAjeN0kMMgzCJ3bqTBZ3QS_HUi8n39X=r8qbstxnt...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

You could try copying the file. You would probably be better off to
download the source code and compile and install that way. There are
instructions on how to do that, it's not very difficult.

On Tue, May 15, 2018 at 11:10 PM, Ralph Shamie <[email protected]> wrote:

> Terry,
>
> Thank you. I do not have a motion file in /etc/init.d. I am running PCLOS,
> which uses rpm files.
>
> Do you think I should try copying this file?
>
>
> On 05/15/2018 09:17 AM, Terry Parker wrote:
>
> Here is the contents of my motion file in /etc/init.d/:
>
>
> #!/bin/sh -e
> #
> # /etc/init.d/motion: Start the motion detection
> #
> ### BEGIN INIT INFO
> # Provides:   motion
> # Required-Start: $local_fs $syslog $remote_fs
> # Required-Stop: $remote_fs
> # Default-Start:  2 3 4 5
> # Default-Stop: 0 1 6
> # Short-Description: Start Motion detection
> # Description: loads motion and assigns privileges
> ### END INIT INFO
>
> # Ported to new debian way using sh and /lib/lsb/init-functions
> # by Angel Carpintero <[email protected]>
> # Modified by : Juan Angulo Moreno <[email protected]>
> #               Eddy Petrisor <[email protected]>
> #               ArAge <[email protected]>
>
> NAME=motion
> PATH_BIN=/bin:/usr/bin:/sbin:/usr/sbin
> DAEMON=/usr/bin/motion
> DEFAULTS=/etc/default/$NAME
> DESC="motion detection daemon"
>
> ENV="env -i LANG=C PATH=$PATH_BIN"
>
> . /lib/lsb/init-functions
>
> test -x $DAEMON || exit 0
>
> RET=0
>
> [ -r "$DEFAULTS" ] && . "$DEFAULTS" || start_motion_daemon=yes
>
>
> check_daemon_enabled () {
>     if [ "$start_motion_daemon" = "yes" ] ; then
>         return 0
>     else
>         log_warning_msg "Not starting $NAME daemon, disabled via
> /etc/default/$NAME"
>         return 1
>     fi
>
> }
>
>
> case "$1" in
>   start)
>     if check_daemon_enabled ; then
>         if ! [ -d /var/run/motion ]; then
>             mkdir -m 02750 /var/run/motion
>             chown motion:motion /var/run/motion
>         fi
>         if ! [ -d /var/lib/motion ]; then
>             mkdir -m 02750 /var/lib/motion
>             chown motion:adm /var/lib/motion
>         fi
>         if ! [ -d /var/log/motion ]; then
>             mkdir -m 02750 /var/log/motion
>             chown motion:adm /var/log/motion
>         fi
>         log_daemon_msg "Starting $DESC" "$NAME"
>         if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid
> motion ; then
>             log_end_msg 0
>         else
>             log_end_msg 1
>             RET=1
>         fi
>     fi
>     ;;
>
>   stop)
>     log_daemon_msg "Stopping $DESC" "$NAME"
>     if start-stop-daemon --stop --oknodo --exec $DAEMON --retry 30 ; then
>         log_end_msg 0
>     else
>         log_end_msg 1
>         RET=1
>     fi
>     ;;
>
>   reload|force-reload)
>     log_daemon_msg "Reloading $NAME configuration"
>     if start-stop-daemon --stop --signal HUP --exec $DAEMON ; then
>         log_end_msg 0
>     else
>         log_end_msg 1
>         RET=1
>     fi
>     ;;
>
>   restart-motion)
>     if check_daemon_enabled ; then
>         log_action_begin_msg "Restarting $NAME"
>         if $0 stop && $0 start ; then
>             log_action_end_msg 0
>         else
>             log_action_cont_msg "(failed)"
>             RET=1
>         fi
>     fi
>     ;;
>
>   restart)
>     $0 restart-motion
>     ;;
>
>   status)
>     status_of_proc /usr/bin/motion motion
>     ;;
>
>   *)
>     echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|status}"
>     RET=1
>     ;;
> esac
>
>
> exit $RET
>
>
> This is on Debian 9
>
> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Motion-user mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>> https://motion-project.github.io/
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Motion-user mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Wed, 16 May 2018 08:36:35 +0100
From: Dougie Nisbet <[email protected]>
To: [email protected]
Subject: Re: [Motion-user] motion daemon not starting
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

On 14/05/18 23:36, Ralph Shamie wrote:

>#
>
> /etc/init.d/motion not installed from synaptic
>
If you're saying that motion won't start *automatically* - i.e. on 
system boot - then this file is essential.

Would your normal use to be running motion as root?

I always run motion as a normal user. And for reasons I can't recall, 
I've always just used a cron job to check whether motion is running, and 
restart it as necessary. It's probably something I've done since 
motion's early days and never got out of the habit of doing. I think 
it's because I tweak the config file a lot and do a 'killall motion' 
afterwards then just wait for cron to restart it.

It's just a few lines:

    #!/bin/bash

    if ps -C motion > /dev/null 2>&1
    then
     ??? ps -C motion > /tmp/.motion.is.running
    else
     ??? nohup motion > /home/dougie/logs/motion.log 2>&1 &
    fi

    # EOF



-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 143, Issue 21
********************************************

Reply via email to