@@ -42,14 +42,20 @@ start() {
4242 # launch all preferred dependencies
4343 #start_softdeps
4444 # launch our own program
45+ startService
46+ # if successful, then register
47+ register
4548}
4649
4750stop() {
51+ echo "stopping $prog"
4852 # are we running? If so, then stop, otherwise, do nothing...
49− if test -a $STATDIR/$prog = 0; then
53+ if ! test -a $STATEDIR/$prog; then
5054 exit 0
5155 fi
5256 # stop our own program
57+ stopService
58+ unregister
5359}
5460
5561register() {
@@ -62,7 +68,7 @@ unregister() {
6268
6369status() {
6470 # are we running? If so, report
65− if test -a $STATDIR/$prog; then
71+ if test -a $STATEDIR/$prog; then
6672 echo "running"
6773 else
6874 echo "stopped"