-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·39 lines (35 loc) · 1.04 KB
/
Copy pathrun.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.04 KB
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
39
#!/bin/bash
# Check folder existence
if test ! -w /app; then
echo "Application folder /app not present or not writable"
exit 1
fi
if test ! -w /data; then
echo "Data folder /data not present or not writable"
exit 1
fi
# Check for shared folders which cause all kinds of weird errors on core updates
rm -f /data/check-for-shared-with-data
touch /app/check-for-shared-with-data
if test -f /data/check-for-shared-with-data; then
echo "Application folder /app and Data folder /data are shared. Please fix this."
exit 1
fi
rm -f /app/check-for-shared-with-data
# Optionally download the app
cd /app
if test ! -d RoonServer; then
if test -z "$ROON_SERVER_URL" -o -z "$ROON_SERVER_PKG"; then
echo "Missing URL ROON_SERVER_URL and/or app name ROON_SERVER_PKG"
exit 1
fi
curl -L $ROON_SERVER_URL -O
tar xjf $ROON_SERVER_PKG
rm -f $ROON_SERVER_PKG
fi
# Run the app
if test -z "$ROON_DATAROOT" -o -z "$ROON_ID_DIR"; then
echo "Dataroot ROON_DATAROOT and/or ID dir ROON_ID_DIR not set"
exit 1
fi
/app/RoonServer/start.sh