test_apps/break_yo_system_ynh/scripts/upgrade

17 lines
477 B
Text
Raw Normal View History

set -eux
source /usr/share/yunohost/helpers
# Retrieve arguments
app=$YNH_APP_INSTANCE_NAME
domain=$(sudo yunohost app setting $app domain)
breakwhat=$(sudo yunohost app setting $app breakwhat)
if [[ $breakwhat == "upgrade" ]] || [[ $breakwhat == "everything" ]]
then
echo "; WTF ; ?!() {{{{" > /etc/nginx/conf.d/$domain.d/$app.conf
service nginx restart || true # What could go wrong lol
else
rm /etc/nginx/conf.d/$domain.d/$app.conf
service nginx reload
fi