Help needed writing a runscript in Gentoo
Can anyone help me with this runscript please? It's urgently needed for tomorrow, and this is my first time doing one. I'm using Gentoo (and tried to follow the article in their wiki).
I could do with getting rid of the long lines too... does \ work?
Many thanks,
Steve.
The errors I'm getting are:
---------
mozart btoolkit # /etc/init.d/BToolkitd start
* Caching service dependencies ... [ ok ]
* ERROR: not enough args.
* Usage: BToolkitd { start|stop|restart }
* BToolkitd without arguments for full help
---------
This is what I have so far:
---------
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# BToolkit directory
set BKITDIR=/usr/bin/btoolkit/BKIT
# BToolkit licence directory
set LICDIR=/usr/bin/btoolkit/BKIT
depend() {
# Needs network
need net
}
start() {
# What's happening?
ebegin "Starting BToolkitd"
# Fingers crossed...
start-stop-daemon --start --background --pidfile /var/run/BToolkitd.pid --make-pidfile --exec $BKITDIR/BToolkitd $LICDIR
# Did it work?
eend $?
}
stop() {
# Foot on the brakes please driver
ebegin "Stopping BToolkitd"
# Stopping...
start-stop-daemon --stop --pidfile /var/run/BToolkitd.pid --name BToolkitd
# Did it work?
eend $?
}
#restart() {i
# Nothing yet
#}
---------
|