#!/usr/bin/bash # MUST USE SUDO TIGRO_DIR=/home/kora/Codes/Progetto_2023-OVI FE_DIR=${TIGRO_DIR}/site2 BE_DIR=${TIGRO_DIR}/flask_be if test -f ${BE_DIR}/pid.nohup ; then kill $(cat ${BE_DIR}/pid.nohup) fi cp -r ${FE_DIR}/* /var/www/html/ cp ${FE_DIR}/js/config_alt.js /var/www/html/js/config.js cd ${BE_DIR} source venv/bin/activate nohup waitress-serve --host 127.0.0.42 --port 5000 app:app >&nohup.out & echo $! > pid.nohup exit