Skip to content

Commit

Permalink
sample: use lowercase in init.d/conf.d sample files
Browse files Browse the repository at this point in the history
  • Loading branch information
ncopa committed Dec 30, 2009
1 parent 5847b54 commit 171df57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
4 changes: 2 additions & 2 deletions sample.confd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Sample conf.d file for alpine linux

#
# Specify daemon $OPTS here.
# Specify daemon options here.
#

OPTS=""
sample_opts=""
30 changes: 10 additions & 20 deletions sample.initd
Original file line number Diff line number Diff line change
Expand Up @@ -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 $?
}

0 comments on commit 171df57

Please sign in to comment.