OpenRC init scripts
This commit is contained in:
parent
84d54ed276
commit
7e4775208f
2 changed files with 45 additions and 0 deletions
22
piped.init
Executable file
22
piped.init
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
name=$RC_SVCNAME
|
||||
command="/bin/ash"
|
||||
command_args="/home/piped/start.sh"
|
||||
command_user="piped"
|
||||
directory="/home/piped"
|
||||
|
||||
output_log="/var/log/$RC_SVCNAME/piped.log"
|
||||
error_log="/var/log/$RC_SVCNAME/error.log"
|
||||
|
||||
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
|
||||
command_background="yes"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner $command_user:$command_user --mode 0775 \
|
||||
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
||||
}
|
23
proxy.init
Normal file
23
proxy.init
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
export UDS=1
|
||||
|
||||
name=$RC_SVCNAME
|
||||
command="/home/ytproxy/piped-proxy"
|
||||
command_user="nginx"
|
||||
directory="/home/ytproxy"
|
||||
|
||||
output_log="/var/log/$RC_SVCNAME/proxy.log"
|
||||
error_log="/var/log/$RC_SVCNAME/error.log"
|
||||
|
||||
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
|
||||
command_background="yes"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner $command_user:$command_user --mode 0775 \
|
||||
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
||||
}
|
Loading…
Add table
Reference in a new issue