shell script - resque
Kaushal Shriyan
kaushalshriyan at gmail.com
Mon May 31 14:06:58 UTC 2010
Hi,
I have the below init shell script. While i run it by hand it works
perfectly fine, but does not start automatically after boot up. I have run
the command update-rc.d resque defaults.
Please suggest/guide.
#!/bin/bash
# Author Kaushal Shriyan
# Date 31/05/2010
# Startup script for Resque Server
touch /root/status
set -e
start_resque=/usr/local/AddressBook/EntAddressBookDataStore/current/resque_cluster_start.sh
stop_resque=/usr/local/AddressBook/EntAddressBookDataStore/current/resque_cluster_stop.sh
start() {
echo -n "Starting ResqueServer: "
${start_resque}
echo "starting" >> /root/status
uptime >> /root/status
echo "done."
exit 0
}
stop() {
echo -n "Shutting down ResqueServer: "
${stop_resque}
echo "done."
exit 0
}
# See how we were called
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 10
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20100531/90676bcc/attachment.html>
More information about the ubuntu-server
mailing list