mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-29 02:11:16 +02:00
31 lines
470 B
Plaintext
31 lines
470 B
Plaintext
#!/sbin/runscript
|
|
|
|
# Sample init.d file for alpine linux.
|
|
|
|
name=tor
|
|
daemon=/usr/bin/$name
|
|
|
|
depend() {
|
|
need net
|
|
after firewall
|
|
provide $name
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting ${name}"
|
|
start-stop-daemon --start --quiet \
|
|
--pidfile /var/run/${name}.pid \
|
|
-u ${name} \
|
|
--exec ${daemon} -- --runasdaemon 1
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping ${name}"
|
|
start-stop-daemon --stop --quiet \
|
|
--pidfile /var/run/$name.pid \
|
|
--exec ${daemon}
|
|
eend $?
|
|
}
|
|
|