-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathget_core_ip
More file actions
executable file
·29 lines (22 loc) · 633 Bytes
/
get_core_ip
File metadata and controls
executable file
·29 lines (22 loc) · 633 Bytes
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
#!/bin/bash
ROON=/usr/local/Roon
ROONAPI=${ROON}/api
CORE=get_core_ip.py
[ -d $ROONAPI ] || exit 1
cd $ROONAPI || exit 1
[ -f $CORE ] || exit 2
# echo "When prompted for authorization, go to a Roon Remote client window,"
# echo "click on 'Settings' then click on 'Extensions' then 'Enable' the extension"
# Use a Python virtual environment
[ -f ${ROON}/venv/bin/activate ] && source ${ROON}/venv/bin/activate
[[ ":$PATH:" == *":/usr/local/Roon/venv/bin:"* ]] || {
export PATH=/usr/local/Roon/venv/bin:${PATH}
}
have_python3=$(type -p python3)
if [ "${have_python3}" ]
then
python3 $CORE
else
python $CORE
fi
sleep 4