1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-17 05:05:14 +03:00
aports/community/dcc/dccd.initd
Bart Ribbers d82f234f1a community/dcc: stop installing files to /var
For some reason this package was installing all kinds of binaries to
/var/dcc/libexec, even though /var is meant for "variable data files".
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05.html#purpose31

Architecture specific files are supposed to go to different directories,
libexec for example should go to /usr/libexec.
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html
2024-11-03 21:01:57 +00:00

41 lines
730 B
Bash

#!/sbin/openrc-run
_le=/usr/libexec
name=dccd
command="$_le/start-$name"
pidfile="/run/dcc/$name.pid"
dcc_conf="/var/dcc/dcc_conf"
depend() {
use logger
need net
before mta dccifd dccm
after firewall
}
start_pre() {
# start-dccd runs its own checks
if [ ! -f "$command" ]; then
ewarn "dcc-dccd is not installed"
return 1
fi
if [ ! -f "$dcc_conf" ]; then
ewarn "Configuration file $dcc_conf not found"
return 1
fi
if [ -z $(grep "^SRVR_ID=" "$dcc_conf" | sed "s/.*=//") ]; then
ewarn "SRVR_ID must be set in $dcc_conf"
return 1
fi
if ! grep -q "^DCCD_ENABLE=on" "$dcc_conf"; then
ewarn "DCCD_ENABLE is not set to on in $dcc_conf"
return 1
fi
return 0
}
stop() {
"$_le/stop-$name" -S
eend $?
}