update install scripts

This commit is contained in:
fram3d 2024-01-18 14:37:38 +01:00
parent b74c6a87b9
commit 864a75fe7b
Signed by: fram3d
GPG Key ID: 938920E709EEA32A
3 changed files with 20 additions and 0 deletions

View File

@ -2,3 +2,11 @@
/usr/bin/systemctl enable flaskapp.service
/var/flaskapp/init_db.py
/sbin/service flaskapp start
if [ -f /tmp/oldflaskappconfig.ini ] ; then
cp /tmp/oldflaskappconfig.ini /var/flaskapp/flaskapp/config.ini
rm /tmp/oldflaskappconfig.ini
fi
if [ -f /tmp/oldflaskapp.db ] ; then
cp /tmp/oldflaskapp.db /var/flaskapp/instance/flaskapp.db
rm /tmp/oldflaskapp.db
fi

View File

@ -0,0 +1,6 @@
if [ -f /var/flaskapp/flaskapp/config.ini ] ; then
cp /var/flaskapp/flaskapp/config.ini /tmp/oldflaskappconfig.ini
fi
if [ -f /var/flaskapp/instance/flaskapp.db ] ; then
cp /var/flaskapp/instance/flaskapp.db /tmp/oldflaskapp.db
fi

View File

@ -1,3 +1,9 @@
#!/bin/sh
/sbin/service flaskapp stop
/usr/bin/systemctl disable flaskapp.service
if [ -f /var/flaskapp/flaskapp/config.ini ] ; then
cp /var/flaskapp/flaskapp/config.ini /tmp/oldflaskappconfig.ini
fi
if [ -f /var/flaskapp/instance/flaskapp.db ] ; then
cp /var/flaskapp/instance/flaskapp.db /tmp/oldflaskapp.db
fi