forked from PDXostc/media_manager-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmm
executable file
·40 lines (37 loc) · 1.04 KB
/
mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# Usage:
# mm {start|stop|restart}
action="$1"
case "$action" in
stop)
echo "Stopping media manager services..."
killall media-manager
killall rygel
killall lightmediascannerd
killall xwalk-launcher
killall python
;;
start)
echo "Starting media manager services..."
rm -f /home/app/.config/lightmediascannerd/*
ls /home/app/.config/lightmediascannerd/
rm -f /home/app/content/Images/media-manager-artwork/*.jpg
ls /home/app/content/Images/media-manager-artwork/
lightmediascannerd -S -D /mnt &
sleep 2
rygel -n lo &
LD_LIBRARY_PATH=/opt/genivi/lib media-manager &
cd /home/app/content/Images/media-manager-artwork/ && python /home/app/content/Images/media-manager-artwork/simpleserver.py &
sleep 1
LD_LIBRARY_PATH=/opt/genivi/lib xwalk-launcher -d JLRPOCX003.MediaManager
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage $0 {start|stop|restart}"
;;
esac