mirror of
https://github.com/YunoHost-Apps/psitransfer_ynh.git
synced 2024-09-03 20:16:06 +02:00
Create remove
This commit is contained in:
parent
b5d89ec76c
commit
86eb609ce6
1 changed files with 34 additions and 0 deletions
34
scripts/remove
Normal file
34
scripts/remove
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Exit on command errors and treat unset variables as an error
|
||||||
|
set -u
|
||||||
|
|
||||||
|
# Source app helpers
|
||||||
|
source _common.sh
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
# Retrieve app settings
|
||||||
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
|
|
||||||
|
# Stop and remove service
|
||||||
|
ynh_remove_systemd_config
|
||||||
|
|
||||||
|
# Remove logrotate configuration
|
||||||
|
ynh_remove_logrotate
|
||||||
|
|
||||||
|
# Remove sources
|
||||||
|
ynh_secure_remove "/var/www/$app"
|
||||||
|
|
||||||
|
# Remove nginx configuration file
|
||||||
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
|
# Remove user and data
|
||||||
|
ynh_system_user_delete $app
|
||||||
|
|
||||||
|
# Remove monitor
|
||||||
|
sudo yunohost service remove $app
|
||||||
|
|
||||||
|
# Remove Nodejs
|
||||||
|
ynh_remove_nodejs
|
Loading…
Add table
Reference in a new issue