Initial commit of source code
This commit is contained in:
10
misc/openrc/uvscand.confd
Executable file
10
misc/openrc/uvscand.confd
Executable file
@@ -0,0 +1,10 @@
|
||||
# /etc/conf.d/uvscand: config file for /etc/init.d/uvscand
|
||||
|
||||
# Start the daemon as the user. You can optionally append a group name here also.
|
||||
USER="postfix"
|
||||
# USER="postfix:nobody"
|
||||
|
||||
CONFIG="/etc/uvscand.conf"
|
||||
|
||||
# Optional parameters for uvscand
|
||||
UVSCAND_OPTS=""
|
||||
36
misc/openrc/uvscand.initd
Executable file
36
misc/openrc/uvscand.initd
Executable 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
|
||||
}
|
||||
Reference in New Issue
Block a user