remove 1.35 KB
Newer Older
1
#!/bin/bash
2

3
4
5
6
7
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
8

9
source _common.sh
10
source /usr/share/yunohost/helpers
11
12
13
14
15
16
17
18
19

#=================================================
# LOAD SETTINGS
#=================================================

app=$YNH_APP_INSTANCE_NAME

domain=$(ynh_app_setting_get $app domain)
app_user=$(ynh_app_setting_get $app app_user)
20
final_path=$(ynh_app_setting_get $app final_path)
21
22
23
24
25
26
opt_path=$(ynh_app_setting_get $app opt_path)

#=================================================
# STANDARD REMOVE
#=================================================

HgO's avatar
HgO committed
27
ynh_script_progression "Removing static site..."
28

Aleks's avatar
Aleks committed
29
ynh_secure_remove $final_path
30

31
ynh_remove_nginx_config
32

HgO's avatar
HgO committed
33
ynh_script_progression "Removing automatic vpn certificate renewal..."
34

Aleks's avatar
Aleks committed
35
36
ynh_secure_remove $opt_path
ynh_secure_remove /etc/cron.daily/$app-renew-cert
37
38
39
40
41

#=================================================
# REMOVE DEPENDENCIES
#=================================================

HgO's avatar
HgO committed
42
ynh_script_progression "Removing dependencies..."
43
44
45
46
47
48
49

ynh_remove_app_dependencies

#=================================================
# REMOVE DEDICATED USER
#=================================================

HgO's avatar
HgO committed
50
ynh_script_progression "Removing system user..."
51
ynh_system_user_delete $app_user
52