Re: Run a small script at shutdown/reboot

2014-02-18 Thread Jon Danniken
On 02/18/2014 03:13 AM, Jaikumar Sharma wrote: > Hi Jon, > > On Tue, Feb 18, 2014 at 9:16 AM, Jon Danniken wrote: > >> Hello list, I have a small script (foobar.sh) which I would like to run >> at shutdown or reboot: >> >>> So what am I missing here? I'm guessing that using update-rc.d is >>>

Re: Run a small script at shutdown/reboot

2014-02-18 Thread Jon Danniken
On 02/18/2014 05:57 AM, Jonathan Dowland wrote: > If you have cron on your machine, I think the easiest thing to do is to > use the '@reboot' cron time specification, either in /etc/crontab, a > file in /etc/cron.d or root's personal crontab. e.g. > > @reboot /usr/local/bin/foobar.sh > > assu

Re: Run a small script at shutdown/reboot

2014-02-18 Thread Jonathan Dowland
If you have cron on your machine, I think the easiest thing to do is to use the '@reboot' cron time specification, either in /etc/crontab, a file in /etc/cron.d or root's personal crontab. e.g. @reboot /usr/local/bin/foobar.sh assuming that's where the script is and it's +x -- To UNSUBSCRI

Re: Run a small script at shutdown/reboot

2014-02-18 Thread Jaikumar Sharma
Hi Jon, On Tue, Feb 18, 2014 at 9:16 AM, Jon Danniken wrote: > Hello list, I have a small script (foobar.sh) which I would like to run > at shutdown or reboot: > > >So what am I missing here? I'm guessing that using update-rc.d is > >probably more heavy duty/involved than I need for this littl

Run a small script at shutdown/reboot

2014-02-17 Thread Jon Danniken
Hello list, I have a small script (foobar.sh) which I would like to run at shutdown or reboot: __ #!/bin/bash if [ -a /test/foo.bar ]; then mv /test/foo.bar /test/foo.foo fi _ I placed the script into /etc/init.d/, made it executable