blob: d6c182d4a8f220948a9c90b2306c49a3a11e98ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/sbin/openrc-run
RUNTIME="${XDG_RUNTIME_DIR}/${RC_SVCNAME}"
CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/copyparty"
command="/usr/bin/copyparty"
command_args="-c ${CONFIG}/copyparty.conf -lo ${RUNTIME}/${RC_SVCNAME}.log"
command_background=true
pidfile="${RUNTIME}/${RC_SVCNAME}.pid"
extra_commands="checkconfig"
checkconfig() {
"${command}" ${command_args} --exit cfg
}
start_pre() {
# TODO: copy a system-wide default configuration to .config/copyparty/copyparty.conf
if ! checkconfig > /dev/null 2>&1; then
eerror "Invalid configuration. Use the checkconfig command for details."
return 1
fi
checkpath -d "${RUNTIME}"
}
|