1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/minidlna/minidlna.initd
Carlo Landmeter 4dd9320140 community/minidlna: move to community and update db dir
moved db dir from /var/cache to /var/lib
added a check in post-upgrade to notify use of this change
2016-12-06 15:05:33 +01:00

26 lines
556 B
Text

#!/sbin/openrc-run
name="MiniDLNA"
configfile="${CONFIG:-/etc/minidlna.conf}"
start_stop_daemon_args="--user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna}"
pidfile="/run/minidlna/minidlna.pid"
command=/usr/sbin/minidlnad
command_args="-f ${configfile} -P $pidfile"
depend() {
need net
}
start_pre() {
if ! [ -f "${configfile}" ]; then
eerror "${configfile} is missing"
return 1
fi
if yesno "${RESCAN}"; then
command_args="$command_args -R"
fi
checkpath --owner ${M_USER:-minidlna}:${M_GROUP:-minidlna} \
--directory ${pidfile%/*}
}