-
Notifications
You must be signed in to change notification settings - Fork 4
/
entrypoint.sh
37 lines (33 loc) · 1.01 KB
/
entrypoint.sh
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
#!/bin/sh
set -e
if [ ! -z "$PRONOTE2MQTT_APP" ]; then
APP="$PRONOTE2MQTT_APP"
else
APP="/app"
fi
echo "Using '$APP' as APP directory"
if [ ! -f "$APP/param.py" ]; then
echo "Param.py non existing, copying default to app..."
cp /app_temp/param.py "$APP/param.py"
fi
if [ ! -f "$APP/pronote.py" ]; then
echo "pronote.py non existing, copying default to app..."
cp /app_temp/pronote.py "$APP/pronote.py"
fi
if [ ! -f "$APP/pronote2mqtt.py" ]; then
echo "pronote2mqtt.py non existing, copying default to app..."
cp /app_temp/pronote2mqtt.py "$APP/pronote2mqtt.py"
fi
if [ ! -f "$APP/database.py" ]; then
echo "pronote2mqtt.py non existing, copying default to app..."
cp /app_temp/database.py "$APP/database.py"
fi
if [ ! -f "$APP/mqtt.py" ]; then
echo "mqtt.py non existing, copying default to app..."
cp /app_temp/mqtt.py "$APP/mqtt.py"
fi
if [ ! -f "$APP/hass.py" ]; then
echo "hass.py non existing, copying default to app..."
cp /app_temp/hass.py "$APP/hass.py"
fi
exec "$@"