Initial commit of source code

This commit is contained in:
2019-05-08 13:55:09 +02:00
parent e985250303
commit 4d2542776f
8 changed files with 455 additions and 0 deletions

36
misc/openrc/uvscand.initd Executable file
View File

@@ -0,0 +1,36 @@
#!/sbin/openrc-run
user=${USER:-daemon}
uvscand_opts="${UVSCAND_OPTS:-}"
cfg="${CONFIG:-}"
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/bin/uvscand"
command_args="-c ${cfg} ${uvscand_opts}"
command_background=true
start_stop_daemon_args="--user ${user}"
depend() {
need net
before mta
}
checkconfig() {
if [ -z "${cfg}" ]; then
eerror "No config file specified!"
fi
return 0
}
start_pre() {
if [ "${RC_CMD}" != "restart" ]; then
checkconfig || return $?
fi
}
stop_pre() {
if [ "${RC_CMD}" != "restart" ]; then
checkconfig || return $?
fi
}