summaryrefslogtreecommitdiff
path: root/community/minidlna/minidlna.rc
diff options
context:
space:
mode:
Diffstat (limited to 'community/minidlna/minidlna.rc')
-rwxr-xr-xcommunity/minidlna/minidlna.rc8
1 files changed, 7 insertions, 1 deletions
diff --git a/community/minidlna/minidlna.rc b/community/minidlna/minidlna.rc
index 6e6f88f35..5a9d7b51c 100755
--- a/community/minidlna/minidlna.rc
+++ b/community/minidlna/minidlna.rc
@@ -17,7 +17,7 @@ case "$1" in
if [[ -z "$PID" ]]; then
rm -f /var/run/$daemon_name.pid
touch /var/run/$daemon_name.pid && chown $MINIDLNA_USER:$MINIDLNA_USER /var/run/$daemon_name.pid
- su -s /bin/sh -l -c /usr/sbin/minidlna - $MINIDLNA_USER
+ su -s /bin/sh -l -c "/usr/sbin/minidlna ${MINIDLNA_OPTS} $2" - $MINIDLNA_USER
if [[ $? -gt 0 ]]; then
stat_fail
exit 1
@@ -61,6 +61,12 @@ case "$1" in
$0 start
;;
+ rescan)
+ $0 stop
+ sleep 1
+ $0 start -R
+ ;;
+
*)
echo "usage: $0 {start|stop|restart|clean}"
esac