mirror of
https://github.com/YunoHost/test_apps.git
synced 2024-09-03 20:06:29 +02:00
21 lines
526 B
Text
21 lines
526 B
Text
|
set -eux
|
||
|
|
||
|
source /usr/share/yunohost/helpers
|
||
|
|
||
|
# Retrieve arguments
|
||
|
app=$YNH_APP_INSTANCE_NAME
|
||
|
domain=$YNH_APP_ARG_DOMAIN
|
||
|
breakwhat=$YNH_APP_ARG_BREAKWHAT
|
||
|
|
||
|
ynh_app_setting_set $app domain $domain
|
||
|
ynh_app_setting_set $app breakwhat $breakwhat
|
||
|
|
||
|
if [[ $breakwhat == "install" ]] || [[ $breakwhat == "everything" ]]
|
||
|
then
|
||
|
echo "; WTF ; ?!() {{{{" > /etc/nginx/conf.d/$domain.d/$app.conf
|
||
|
service nginx restart || true # What could go wrong lol
|
||
|
else
|
||
|
touch /etc/nginx/conf.d/$domain.d/$app.conf
|
||
|
service nginx reload
|
||
|
fi
|