#!/bin/bash set -e web_user="www-data" path="/opt/coinmanager" cd $path/coinmanager echo -n "fetching " git pull -q origin master >/dev/null echo -n "... bumping " version=$(date +"%y%m%d") sed -i "s/[0-9]\{6\}/$version/g" coinc/templates/footer.html echo -n "... collecting " pipenv run python3 manage.py collectstatic --settings coinmanager.production_settings --no-input echo -n "... owning " chmod 775 db.sqlite3 chown -R $web_user:$web_user $path echo "... reloading " systemctl reload apache2