Add OpenRC example scripts
This commit is contained in:
parent
85a94fbb73
commit
c64c98c1ee
20
contrib/OpenRC/udpt.initd
Normal file
20
contrib/OpenRC/udpt.initd
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
description="UDP bittorrent Tracker"
|
||||
supervisor=supervise-daemon
|
||||
command=/usr/bin/udpt
|
||||
command_args="-c /etc/udpt.conf"
|
||||
command_user="udpt:udpt"
|
||||
output_log=/var/log/$RC_SVCNAME.log
|
||||
stopsig="SIGINT"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner $command_user --mode 0775 \
|
||||
/var/lib/$RC_SVCNAME
|
||||
checkpath --file --owner $command_user --mode 0644 \
|
||||
/var/log/$RC_SVCNAME.log
|
||||
}
|
5
contrib/OpenRC/udpt.pre-install
Normal file
5
contrib/OpenRC/udpt.pre-install
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
addgroup -S udpt 2>/dev/null
|
||||
adduser -S -D -H -h /dev/null -s /sbin/nologin -g udpt udpt 2>/dev/null
|
||||
exit 0
|
Loading…
Reference in a new issue