mirror of
https://github.com/YunoHost-Apps/shaarli_ynh.git
synced 2024-09-03 20:26:10 +02:00
Update remove script
This commit is contained in:
parent
d72e85f619
commit
4902c1ebba
1 changed files with 18 additions and 4 deletions
|
@ -1,7 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
domain=$(sudo yunohost app setting shaarli domain)
|
||||
# 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
|
||||
|
||||
sudo rm -rf /var/www/shaarli
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/shaarli.conf
|
||||
sudo rm -rf /home/yunohost.app/shaarli/data
|
||||
domain=$(sudo yunohost app setting $app domain)
|
||||
www_path=$(sudo yunohost app setting $app path | sed -e 's@^/@@' -e 's@/$@@')
|
||||
|
||||
sudo rm -rf /var/www/$www_path
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
||||
sudo service nginx reload
|
||||
|
|
Loading…
Add table
Reference in a new issue