summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--changelog1
-rwxr-xr-xsrc.etc/init.d/httpd5
-rwxr-xr-xsrc.etc/init.d/klogd4
-rwxr-xr-xsrc.etc/init.d/syslog4
-rwxr-xr-xsrc.etc/init.d/telnetd5
5 files changed, 11 insertions, 8 deletions
diff --git a/changelog b/changelog
index e25e565..84e6c2d 100644
--- a/changelog
+++ b/changelog
@@ -10,6 +10,7 @@ busybox (1.21.1-5) trunk
"enable" action.
* Stop and start services in maintainer scripts.
* Fix interface names in /etc/network/interfaces.
+ * Make certain service scripts create and use PID files.
-- "P. J. McDermott" <pj@pehjota.net> Mon, 02 Jun 2014 19:58:21 -0400
diff --git a/src.etc/init.d/httpd b/src.etc/init.d/httpd
index dc73d87..c26e151 100755
--- a/src.etc/init.d/httpd
+++ b/src.etc/init.d/httpd
@@ -6,11 +6,12 @@ STOP='60'
start()
{
log 'Starting httpd'
- start-stop-daemon -S -q -n httpd -x /usr/sbin/httpd -- -h /var/www
+ start-stop-daemon -S -q -p /var/run/httpd.pid -m \
+ -x /usr/sbin/httpd -b -- -f -h /var/www
}
stop()
{
log 'Stopping httpd'
- start-stop-daemon -K -q -n httpd
+ start-stop-daemon -K -q -p /var/run/httpd.pid
}
diff --git a/src.etc/init.d/klogd b/src.etc/init.d/klogd
index aa1952c..20b7ac3 100755
--- a/src.etc/init.d/klogd
+++ b/src.etc/init.d/klogd
@@ -6,11 +6,11 @@ STOP='70'
start()
{
log 'Starting klogd'
- start-stop-daemon -S -q -n klogd -x /sbin/klogd
+ start-stop-daemon -S -q -x /sbin/klogd
}
stop()
{
log 'Stopping klogd'
- start-stop-daemon -K -q -n klogd
+ start-stop-daemon -K -q -p /var/run/klogd.pid
}
diff --git a/src.etc/init.d/syslog b/src.etc/init.d/syslog
index 095a9bf..32e4bd6 100755
--- a/src.etc/init.d/syslog
+++ b/src.etc/init.d/syslog
@@ -8,12 +8,12 @@ STOP='70'
start()
{
log 'Starting syslog'
- start-stop-daemon -S -q -n syslogd -x /sbin/syslogd -- \
+ start-stop-daemon -S -q -x /sbin/syslogd -- \
-s "${SYSLOG_ROTATE_SIZE}"
}
stop()
{
log 'Stopping syslog'
- start-stop-daemon -K -q -n syslogd
+ start-stop-daemon -K -q -p /var/run/syslogd.pid
}
diff --git a/src.etc/init.d/telnetd b/src.etc/init.d/telnetd
index 50843e3..98f668d 100755
--- a/src.etc/init.d/telnetd
+++ b/src.etc/init.d/telnetd
@@ -6,11 +6,12 @@ STOP='60'
start()
{
log 'Starting telnetd'
- start-stop-daemon -S -q -n telnetd -x /usr/sbin/telnetd
+ start-stop-daemon -S -q -p /var/run/telnetd.pid -m \
+ -x /usr/sbin/telnetd -b -- -F
}
stop()
{
log 'Stopping telnetd'
- start-stop-daemon -K -q -n telnetd
+ start-stop-daemon -K -q -p /var/run/telnetd.pid
}