mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-23 23:42:35 +00:00
21cd6680ee
abuild [-c] -n PKGNAME[-PKGVER] creates a directory with new APKBUILD. If -c is specified will sample init.d, conf.d and install script be copied as well.
40 lines
707 B
Plaintext
40 lines
707 B
Plaintext
#!/sbin/runscript
|
|
|
|
# Sample init.d file for alpine linux.
|
|
|
|
NAME=
|
|
DAEMON=/usr/sbin/$NAME
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting ${NAME}"
|
|
start-stop-daemon --start --quiet --background \
|
|
--make-pidfile --pidfile /var/run/${NAME}.pid \
|
|
--chuid ${USER}:${GROUP} \
|
|
--exec ${DAEMON} -- ${OPTS}
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
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
|
|
eend $?
|
|
}
|
|
|