mirror of
https://github.com/YunoHost-Apps/reverseproxy_ynh.git
synced 2024-09-03 20:16:23 +02:00
27 lines
1.1 KiB
Text
27 lines
1.1 KiB
Text
|
#!/bin/bash
|
||
|
|
||
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||
|
set -e
|
||
|
|
||
|
# This is a multi-instance app, meaning it can be installed several times independently
|
||
|
# The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||
|
# The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...)
|
||
|
# The app instance name is available as $YNH_APP_INSTANCE_NAME
|
||
|
# - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample
|
||
|
# - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2
|
||
|
# - ynhexample__{N} for the subsequent installations, with N=3,4, ...
|
||
|
# The app instance name is probably what you are interested the most, since this is
|
||
|
# guaranteed to be unique. This is a good unique identifier to define installation path,
|
||
|
# db names, ...
|
||
|
app=$YNH_APP_INSTANCE_NAME
|
||
|
|
||
|
# Retrieve arguments
|
||
|
domain=$(sudo yunohost app setting $app domain)
|
||
|
|
||
|
# Remove configuration files
|
||
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
||
|
|
||
|
# Restart services
|
||
|
sudo service nginx reload
|
||
|
sudo yunohost app ssowatconf
|