summaryrefslogtreecommitdiff
path: root/sample.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-12-30 08:55:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-12-30 08:55:33 +0000
commit171df570fd9ad39944a0ab322c197961cb7f6f72 (patch)
tree6cf0d1a463d472848bf96dc39217caf51c23a47e /sample.initd
parent5847b5473b251ca2af922a8059288c3e0ed0c952 (diff)
downloadabuild-171df570fd9ad39944a0ab322c197961cb7f6f72.tar.gz
abuild-171df570fd9ad39944a0ab322c197961cb7f6f72.tar.bz2
abuild-171df570fd9ad39944a0ab322c197961cb7f6f72.tar.xz
abuild-171df570fd9ad39944a0ab322c197961cb7f6f72.zip
sample: use lowercase in init.d/conf.d sample files
Diffstat (limited to 'sample.initd')
-rw-r--r--sample.initd30
1 files changed, 10 insertions, 20 deletions
diff --git a/sample.initd b/sample.initd
index 42d03e0..a034601 100644
--- a/sample.initd
+++ b/sample.initd
@@ -2,38 +2,28 @@
# Sample init.d file for alpine linux.
-NAME=
-DAEMON=/usr/sbin/$NAME
+name=
+daemon=/usr/sbin/$name
depend() {
need net
+ after firewall
}
start() {
- ebegin "Starting ${NAME}"
+ ebegin "Starting ${name}"
start-stop-daemon --start --quiet \
- --pidfile /var/run/${NAME}.pid \
- --chuid ${DAEMON_USER}:${DAEMON_GROUP} \
- --exec ${DAEMON} -- ${OPTS}
+ --pidfile /var/run/${name}.pid \
+ --chuid ${sample_user}:${sample_group} \
+ --exec ${daemon} -- ${sample_opts}
eend $?
}
stop() {
- ebegin "Stopping ${NAME}"
+ ebegin "Stopping ${name}"
start-stop-daemon --stop --quiet \
- --exec ${DAEMON} \
- --pidfile /var/run/${NAME}.pid \
- eend $?
-}
-
-reload() {
- ebegin "Reloading ${NAME}"
- if ! service_started "${NAME}" ; then
- eend 1 "${NAME} is not started"
- return 1
- fi
- start-stop-daemon --stop --oknodo --signal HUP \
- --exec ${DAEMON} --pidfile /var/run/${NAME}.pid
+ --pidfile /var/run/$name.pid \
+ --exec ${daemon}
eend $?
}