summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Armak <danarmak@gentoo.org>2001-07-24 08:26:06 +0000
committerDan Armak <danarmak@gentoo.org>2001-07-24 08:26:06 +0000
commit0a42edfbf975b05c718cbfe7c21154bb70be645a (patch)
tree5064c6b121f3fa49e81116e0d4d8ac91d8957018 /net-www/wwwoffle
parentadded some stuff to the ebuild for woodchip from #gentoo (diff)
downloadhistorical-0a42edfbf975b05c718cbfe7c21154bb70be645a.tar.gz
historical-0a42edfbf975b05c718cbfe7c21154bb70be645a.tar.bz2
historical-0a42edfbf975b05c718cbfe7c21154bb70be645a.zip
Fix of stupid syntax mistake. Init script should work all the time now.
Diffstat (limited to 'net-www/wwwoffle')
-rw-r--r--net-www/wwwoffle/files/wwwoffled37
1 files changed, 20 insertions, 17 deletions
diff --git a/net-www/wwwoffle/files/wwwoffled b/net-www/wwwoffle/files/wwwoffled
index e56e1c3e8cd6..81b518f3b663 100644
--- a/net-www/wwwoffle/files/wwwoffled
+++ b/net-www/wwwoffle/files/wwwoffled
@@ -1,32 +1,35 @@
-#! /bin/bash
-#RCUPDATE:2 3 4:95:This line is required for script management
-# Let this start as late as possible, but before those services
-# which must start last e.g. xdm/kdm
-# If it starts too early, it may do so before a working internet
-# connection is up
+#!/bin/sh
+#RCUPDATE:2 3 4:70:This line is required for script management
-. /etc/rc.d/config/basic
. /etc/rc.d/config/functions
+. /etc/rc.d/config/basic
+SERVICE="wwwoffled"
opts="start stop restart"
+#PIDFILE=/var/run/wwwoffled.pid
+EXE=/usr/sbin/wwwoffled
+
+# WARNING: wwwoffled detaches from the console and as it does so it assumes
+# a new pid. DO NOT use pidfile tracking, it does NOT work!
+# (This was a note to self, who did use pidfile tracking until he learned better)
+
start() {
- ebegin "Starting wwwoffled"
- #start-stop-daemon --start --quiet --exe `which wwwoffled` -c /var/spool/wwwoffle/wwwoffle.conf 1>&2
- wwwoffled -c /var/spool/wwwoffle/wwwoffle.conf
- eend $? "Error starting wwwoffled, perhaps it's already running?"
+ ebegin "Starting $SERVICE"
+ start-stop-daemon --start --quiet --exec $EXE -- -c /var/spool/wwwoffle/wwwoffle.conf
+ eend $? "Started $SERVICE." "Error starting $SERVICE."
}
stop() {
- ebegin "Stopping wwwoffled"
- #start-stop-daemon --stop --quiet --exe `which wwwoffled` -c /var/spool/wwwoffle/wwwoffle.conf 1>&2
- wwwoffle -kill
- eend $? "Error stopping wwwoffled, perhaps it wasn't running?"
+ ebegin "Stopping $SERVICE"
+ start-stop-daemon --stop --quiet --exec $EXE
+ eend $? "Stopped $SERVICE." "Error stopping $SERVICE."
}
restart() {
- stop
- start
+ stop
+ sleep 1s
+ start
}
doservice ${@}