updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / linux-mtp-streaming-server / linux-mtp-streaming-server.sh
blob435ac8ca0e85c974e41297b6ead30026ec69d032
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=`pidof -o %PPID /usr/bin/linux_mtp_streaming_server`
7 case "$1" in
8 start)
9 stat_busy "Starting Dovecot"
10 # modify "-i /srv/http/linux_mtpcenter_2.0" path for you local setup; -d -D for debug logging
11 [ -z "$PID" ] && /usr/bin/linux_mtp_streaming_server -d -P /var/run \
12 -p /etc/linux-mtp-streaming-server -i /srv/http/linux_mtpcenter_2.0 -l /srv/http/linux_mtpcenter_2.0/temp/> /dev/null
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon linux_mtp_streaming_server
17 stat_done
20 stop)
21 stat_busy "Stopping Dovecot"
22 [ ! -z "$PID" ] && kill $PID &> /dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon linux_mtp_streaming_server
27 stat_done
30 restart)
31 $0 stop
32 sleep 2
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac
38 exit 0