mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-31 14:22:14 +01:00
* use MD5 library * add patch so pid file does not start with - * move rcDCC to extras * fixes #13361
32 lines
566 B
Bash
32 lines
566 B
Bash
#!/sbin/openrc-run
|
|
|
|
name=dccifd
|
|
command="/var/dcc/libexec/start-$name"
|
|
pidfile="/run/dcc/$name.pid"
|
|
dcc_conf="/var/dcc/dcc_conf"
|
|
|
|
depend() {
|
|
use logger
|
|
need net
|
|
before mta
|
|
after firewall
|
|
}
|
|
|
|
start_pre() {
|
|
# start-dccifd runs its own checks
|
|
if [ ! -f "$command" ]; then
|
|
ewarn "dcc-dccifd is not installed"
|
|
return 1
|
|
fi
|
|
if [ ! -f "$dcc_conf" ]; then
|
|
ewarn "Configuration file $dcc_conf not found"
|
|
return 1
|
|
fi
|
|
if ! grep -q "^DCCIFD_ENABLE=on" "$dcc_conf"; then
|
|
ewarn "DCCIFD_ENABLE is not set to on in $dcc_conf"
|
|
return 1
|
|
fi
|
|
return 0
|
|
}
|
|
|