sample: use lowercase in init.d/conf.d sample files
This commit is contained in:
parent
5847b5473b
commit
171df570fd
|
@ -1,7 +1,7 @@
|
||||||
# Sample conf.d file for alpine linux
|
# Sample conf.d file for alpine linux
|
||||||
|
|
||||||
#
|
#
|
||||||
# Specify daemon $OPTS here.
|
# Specify daemon options here.
|
||||||
#
|
#
|
||||||
|
|
||||||
OPTS=""
|
sample_opts=""
|
||||||
|
|
30
sample.initd
30
sample.initd
|
@ -2,38 +2,28 @@
|
||||||
|
|
||||||
# Sample init.d file for alpine linux.
|
# Sample init.d file for alpine linux.
|
||||||
|
|
||||||
NAME=
|
name=
|
||||||
DAEMON=/usr/sbin/$NAME
|
daemon=/usr/sbin/$name
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need net
|
need net
|
||||||
|
after firewall
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
ebegin "Starting ${NAME}"
|
ebegin "Starting ${name}"
|
||||||
start-stop-daemon --start --quiet \
|
start-stop-daemon --start --quiet \
|
||||||
--pidfile /var/run/${NAME}.pid \
|
--pidfile /var/run/${name}.pid \
|
||||||
--chuid ${DAEMON_USER}:${DAEMON_GROUP} \
|
--chuid ${sample_user}:${sample_group} \
|
||||||
--exec ${DAEMON} -- ${OPTS}
|
--exec ${daemon} -- ${sample_opts}
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
ebegin "Stopping ${NAME}"
|
ebegin "Stopping ${name}"
|
||||||
start-stop-daemon --stop --quiet \
|
start-stop-daemon --stop --quiet \
|
||||||
--exec ${DAEMON} \
|
--pidfile /var/run/$name.pid \
|
||||||
--pidfile /var/run/${NAME}.pid \
|
--exec ${daemon}
|
||||||
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
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue