2014-01-13 13:50:38 +01:00
|
|
|
#!/bin/bash
|
2016-05-14 18:34:34 +02:00
|
|
|
|
|
|
|
# Treat unset variables as an error
|
|
|
|
set -u
|
2014-01-13 13:50:38 +01:00
|
|
|
|
2016-05-13 21:34:03 +02:00
|
|
|
# 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
|
2014-01-13 13:50:38 +01:00
|
|
|
|
2016-05-13 21:34:03 +02:00
|
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
|
|
|
|
|
|
sudo rm -rf /home/yunohost.app/$app
|
|
|
|
sudo rm -rf /var/www/$app
|
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
sudo rm -f /etc/php5/fpm/pool.d/$app.conf
|
2014-01-13 13:50:38 +01:00
|
|
|
|
|
|
|
sudo service php5-fpm restart
|
|
|
|
sudo service nginx reload
|