forked from shawaj/ifi-tidal-release
-
Notifications
You must be signed in to change notification settings - Fork 26
/
speaker-controller-service
executable file
·34 lines (26 loc) · 926 Bytes
/
speaker-controller-service
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
#!/bin/bash
# start/stop script for running the Speaker Controller Application
# This application enables controlling Tidal from the mobile device (Volume,Start/Stop,Next/Prev etc)
function start() {
# Stop if already running
if pgrep -f ^/app/ifi-tidal-release/bin/speaker_controller_application >/dev/null 2>&1
then
echo "Already running..."
stop
fi
echo "Starting Speaker Controller Application..."
docker exec -ti tidal_connect /usr/bin/tmux new-session -d -s speaker_controller_application '/app/ifi-tidal-release/bin/speaker_controller_application'
}
function stop() {
echo "Stopping Speaker Controller Application..."
docker exec -ti tidal_connect /usr/bin/tmux kill-session -t speaker_controller_application
}
case "$1" in
start) start ;;
stop) stop ;;
restart) stop; start ;;
*) echo "usage: $0 start|stop|restart" >&2
echo ""
exit 1
;;
esac