From: Kevin B. <bre...@gm...> - 2008-11-06 23:23:13
|
Ahh..very illuminating! Got it working great now.. In Ubuntu 8.10: sudo cp ~/Downloads/motion-3.2.11/motion.init-Debian /etc/init.d/motion sudo chmod 755 /etc/init.d/motion It didn't make the /var/run/motion/motion.pid (is it supposed to?) for me so: sudo mkdir -m 775 /var/run/motion sudo touch /var/run/motion/motion.pid sudo chgrp motion /var/run/motion/motion.pid Then I could: /etc/init.d/motion {start|stop|status|reload-config|restart} Thanks! On Thu, 2008-11-06 at 23:49 +0100, Aurélien wrote: > On Thu, Nov 6, 2008 at 11:03 PM, Kevin Brewster <bre...@gm...> wrote: > > Hi, > > I'm new to all this so my apologies if this is a dumb question.. > > > > Hi Kevin, > > > Why is there no simple way to stop/start/reload motion from the command > > line besides sending kill signals? > > > > It would be nice if it was like apache or mysql where you can type > > "/etc/init.d/apache start|stop|restart" > > > > Well, /etc/init.d/apache is in fact a simple shell script on most > linux distros. This script does all the necessary things needed to > start, stop and restart the service it takes care of. > > Examples of such a script can be found in your motion distribution, > under the name of motion.init-Debian - if you use Debian, that is. If > not, you can try to look in the documentation of your distribution how > to build it. > > I have not used the Debian script, but I think that copying it to your > /etc/init.d/ directory, then doing a chmod 755 on it should be > sufficient. > > It's late here, so I may be a little off :) Can someone using motion > on Debian please confirm and/or correct the information provided here > ? > > |