add checks for settings file
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
635b963c1a
commit
91e4aaca1d
1 changed files with 7 additions and 0 deletions
7
start.sh
7
start.sh
|
@ -19,12 +19,19 @@ if [ -f ~/NexusDashboard/app/luclient/res/brickdb.zip ]; then
|
||||||
rm ~/NexusDashboard/app/luclient/res/brickdb.zip
|
rm ~/NexusDashboard/app/luclient/res/brickdb.zip
|
||||||
echo "brickdb.zip unpacked and removed"
|
echo "brickdb.zip unpacked and removed"
|
||||||
fi
|
fi
|
||||||
|
echo "check cdclient.sqlite"
|
||||||
# rename ~/NexusDashboard/app/luclient/res/CDServer.sqlite
|
# rename ~/NexusDashboard/app/luclient/res/CDServer.sqlite
|
||||||
if [ -f ~/NexusDashboard/app/luclient/res/CDServer.sqlite ]; then
|
if [ -f ~/NexusDashboard/app/luclient/res/CDServer.sqlite ]; then
|
||||||
echo "moving CDServer.sqlite to cdclient.sqlite"
|
echo "moving CDServer.sqlite to cdclient.sqlite"
|
||||||
mv ~/NexusDashboard/app/luclient/res/CDServer.sqlite ~/NexusDashboard/app/luclient/res/cdclient.sqlite
|
mv ~/NexusDashboard/app/luclient/res/CDServer.sqlite ~/NexusDashboard/app/luclient/res/cdclient.sqlite
|
||||||
fi
|
fi
|
||||||
[ ! -f ~/NexusDashboard/app/luclient/res/cdclient.sqlite ] && echo "cdclient.sqlite not found" && exit 1
|
[ ! -f ~/NexusDashboard/app/luclient/res/cdclient.sqlite ] && echo "cdclient.sqlite not found" && exit 1
|
||||||
|
echo "check settings_example.py"
|
||||||
|
if [ ! -f ~/NexusDashboard/app/settings.py ]; then
|
||||||
|
echo "settings.py not found. Copy settings_example.py to settings.py"
|
||||||
|
cp ~/NexusDashboard/app/settings_example.py ~/NexusDashboard/app/settings.py
|
||||||
|
fi
|
||||||
|
[ -f ~/NexusDashboard/app/settings_example.py ] && rm ~/NexusDashboard/app/settings_example.py && echo "settings_example.py removed"
|
||||||
echo "pre-check done"
|
echo "pre-check done"
|
||||||
cd ~/NexusDashboard
|
cd ~/NexusDashboard
|
||||||
echo "run database migration"
|
echo "run database migration"
|
||||||
|
|
Loading…
Reference in a new issue