[Planetlab-users] Restarting a program after reboot
smuir at CS.Princeton.EDU
Fri Sep 23 10:59:49 EDT 2005
thanks for providing that. the /etc/ssh/fetch_keys is no longer with us,
it's been replaced with /usr/local/planetlab/bin/PlanetLabKeys.sh.
On Fri, 23 Sep 2005, Neil Spring wrote:
> Below is my current rc.vinit. It works reasonably well. You obviously don't
> want to start scriptroute, but the rest may be fine.
> # $1 is the first arg, defined to be "start" or "stop"
> # part of the "stock" rc.vinit, at least temporarily...
> test -e /etc/ssh/fetch_keys && /bin/sh /etc/ssh/fetch_keys
> # all I want is logrotate in cron.daily
> rm -f /etc/cron.daily/[^l]*
> rm -f /etc/cron.hourly/*
> rm -f /etc/cron.weekly/*
> # because I don't see the point of anything else.
> chmod a+r /var/log/*
> /usr/bin/logger rc.vinit running $1 at `date`
> case "$1" in
> /etc/init.d/syslog start
> /etc/init.d/crond start
> /etc/init.d/scriptroute start
> /etc/init.d/scriptroute-thttp start
> /sbin/chkconfig syslog on
> /sbin/chkconfig crond on
> /etc/init.d/scriptroute-thttp stop
> /etc/init.d/scriptroute stop
> /etc/init.d/crond stop
> /etc/init.d/syslog stop
> /etc/init.d/syslog restart
> /etc/init.d/crond restart
> /etc/init.d/scriptroute restart
> /etc/init.d/scriptroute-thttp restart
> echo rc.vinit was called with $1 as an argument
> /usr/bin/logger rc.vinit completed $1 at `date`
> On Sep 23, 2005, at 10:28 AM, Alex Sherman wrote:
>> I want to make sure that my program starts up when a planetlab machine
>> is rebooted. A while back I found a hint somewhere in the FAQ
>> that recommended to modify the /etc/rc.vinit to have crond started
>> at boot time. (And that runs a command in my crontab)
>> Below is the pasted script suggested in the FAQ. However, I find that
>> on some machines crond is not running. I am not sure whether this is
>> a problem with the script or crond starts up and then dies for some
>> unexplained reason.
>> Any suggestions will be appreciated.
>> my /etc/rc.vinit:
>> case "$1" in
>> /etc/init.d/crond start
>> /etc/init.d/crond stop
>> /etc/init.d/crond restart
>> echo rc.vinit was called with $1 as an argument
>> /usr/bin/logger rc.vinit completed $1 at `date`
>> Users mailing list: Users at lists.planet-lab.org
> Users mailing list: Users at lists.planet-lab.org
More information about the Users