









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Debian Startup Script
Here'a generic one that I use for such things. Just change the DAEMON, NAME,
DESC, and OPTIONS lines and it should fire right up.
#! /bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/some/path/to/program
NAME=PROGNAME
DESC="Description of your program here"
OPTIONS=""
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
On Mon, Oct 04, 2004 at 11:33:57AM -0700, Tim Emerick wrote:
> Hey all.
>
> I've been attempting to convert a startup script from Redhat to work on my Debian machine but being a bit of a noob it's greek to me. Can someone help me out. It's a script to startup BOINC as a daemon as the user boinc.
>
> The original Redhat script is here (http://noether.vassar.edu/~myers/help/boinc/init.d-boinc). I compared it to some standard debian scripts (atd, samba, etc) and I'm sure hacked it to pieces. The original script worked once I commented out the redhat functions line (line 20??). It was ugly and spewed error messages but it worked. Here's what I have so far in my conversion process......it doesn't work. ...sigh...
>
> Thanks - Tim
>
--
James Hamilton
Southwest Cyberport
http://www.swcp.com
505-232-7992
|
|