









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Debian Startup Script
- Subject: [NMLUG] Debian Startup Script
- From: timothyemerick at yahoo.com (Tim Emerick)
- Date: Tue Oct 5 17:40:40 2004
- In-reply-to: <20041005180511.GA11150@swcp.com>
Thanks for the script. Couple of questions.
How would I get a particular daemon to run as a particular user?
How do I get programs to run at boot with debian? With redhat I could just put the script in /etc/rc.local.
Tim
James Hamilton <jamesh@swcp.com> wrote:
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
_______________________________________________
NMLUG mailing list
NMLUG@nmlug.org
http://www.nmlug.org/mailman/listinfo/nmlug
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.b9.com/pipermail/nmlug/attachments/20041005/63922c3b/attachment.htm
|
|