Thread: unable to start or stop motion with script
i have following script pretty check status of motion daemon , based on stop or start daemon, have added command along username sudoers file don't have run script sudo credentials; however, script unable start or stop service.
output when trying startcode:#!/bin/bash # script start/stop motion , remove content file # 11/5/2012 dir=/tmp/motion ps -e | grep motion if [ $? -eq 0 ]; #motion running , need stop echo "stopping motion , removing files..." service motion stop if [ -d $dir ]; rm -rf $dir/ 2> /dev/null fi else #motion not running , need start echo "starting motion..." service motion start fi
output when trying stopcode:jorge@nixboxen:~$ ./mocheck.sh starting motion... chown: changing ownership of `/var/run/motion': operation not permitted
code:stopping motion , removing files... * stopping motion detection daemon motion no /usr/bin/motion found running; none killed. [ ok ]
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk unable to start or stop motion with script
Ubuntu
Comments
Post a Comment