mirror of
https://github.com/9001/copyparty.git
synced 2026-02-21 01:40:39 +10:00
OpenRC: Add checkconfig function (#1259)
I found it slightly cumbersome to write a config when the only feedback OpenRC gives is `crashed`, so I added a small QOL function to run copyparty with the `--exit cfg` flag directly from the service. Signed-off-by: charel <charel@lotsaspaghetti.com>
This commit is contained in:
@@ -9,10 +9,19 @@
|
|||||||
# you may want to:
|
# you may want to:
|
||||||
# change '/usr/bin/python' to another interpreter
|
# change '/usr/bin/python' to another interpreter
|
||||||
# change '/mnt::rw' to another location or permission-set
|
# change '/mnt::rw' to another location or permission-set
|
||||||
|
# use a config file instead of command arguments, e.g.:
|
||||||
|
# command_args="-c /etc/copyparty.conf"
|
||||||
|
|
||||||
name="$SVCNAME"
|
name="$SVCNAME"
|
||||||
command_background=true
|
command_background=true
|
||||||
|
extra_commands="checkconfig"
|
||||||
pidfile="/var/run/$SVCNAME.pid"
|
pidfile="/var/run/$SVCNAME.pid"
|
||||||
|
|
||||||
command="/usr/bin/python3 /usr/local/bin/copyparty-sfx.py"
|
command="/usr/bin/python3 /usr/local/bin/copyparty-sfx.py"
|
||||||
command_args="-q -v /mnt::rw"
|
command_args="-q -v /mnt::rw"
|
||||||
|
|
||||||
|
checkconfig() {
|
||||||
|
ebegin "Checking $RC_SVCNAME configuration"
|
||||||
|
$command $command_args --exit cfg
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user