theo/machines/theo-server/deploy/theo-common/upgrade-wrapper.sh.mako
2020-09-19 18:55:17 -05:00

20 lines
370 B
Mako
Executable file

#!/bin/sh -e
if [ "$1" = "--verbose" ]; then
VERBOSE='--verbose'
INVOKE_ARGS='--echo'
else
VERBOSE=
INVOKE_ARGS=
fi
cd ${envroot}
INVOKE="sudo -H -u rattail bin/invoke --collection=app/tasks $INVOKE_ARGS"
# run upgrade task, as rattail user
$INVOKE upgrade
# restart web app
sh -c 'sleep 10; supervisorctl restart ${safename}:${safename}_webmain' &