diff --git a/update b/update index a83efb3..2bf3eda 100755 --- a/update +++ b/update @@ -3,13 +3,7 @@ set -e web_user="www-data" -user="willipink" -path="/home/willipink/coinmanager" - -if [[ "$USER" != "$user" ]]; then - echo "You must be '$user' to run this file." - exit 1 -fi +path="/opt/coinmanager" cd $path/coinmanager @@ -21,11 +15,11 @@ version=$(date +"%y%m%d") sed -i "s/[0-9]\{6\}/$version/g" coinc/templates/footer.html echo -n "... collecting " -python3 manage.py collectstatic --settings coinmanager.production_settings --no-input +pipenv run python3 manage.py collectstatic --settings coinmanager.production_settings --no-input echo -n "... owning " -sudo chmod 775 db.sqlite3 -sudo chown -R $user:$web_user $path +chmod 775 db.sqlite3 +chown -R $web_user:$web_user $path echo "... reloading " -sudo systemctl restart apache2 +systemctl reload apache2