adding more flavors and nuo recipes
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name=$RC_SVCNAME
|
||||
command="/usr/local/bin/$RC_SVCNAME"
|
||||
command_user="$RC_SVCNAME"
|
||||
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
|
||||
start_stop_daemon_args="--start -b"
|
||||
command_args="$command_args"
|
||||
command_background="yes"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner $command_user:$command_user --mode 0775 \
|
||||
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
||||
if [ ! -f "/etc/matchbox/server.crt" ]; then
|
||||
cd /root/tls
|
||||
export SAN="DNS.1:${Vars.MatchBox.Hostname},IP.1:${Vars.NIC[0].IP}"
|
||||
./cert-gen
|
||||
mkdir -p /etc/matchbox
|
||||
cp ca.crt server.crt server.key /etc/matchbox
|
||||
chown -R matchbox:matchbox /etc/matchbox
|
||||
mkdir -p /root/.matchbox
|
||||
cp client.crt client.key ca.crt /root/.matchbox/
|
||||
fi
|
||||
}
|
Reference in New Issue
Block a user