Browse Source

Removing of apps

Bob Mottram 8 years ago
parent
commit
49eb4e8269

+ 2
- 2
src/freedombone-app-batman View File

@@ -88,8 +88,8 @@ function remove_batman {
88 88
         echo $'Failed to remove batman'
89 89
         exit 79353
90 90
     fi
91
-    sed -i '/install_batman/d' $COMPLETION_FILE
92
-    sed -i '/configure_firewall_for_batman/d' $COMPLETION_FILE
91
+    remove_completion_param install_batman
92
+    remove_completion_param configure_firewall_for_batman
93 93
 }
94 94
 
95 95
 function mesh_install_batman {

+ 1
- 1
src/freedombone-app-dlna View File

@@ -164,7 +164,7 @@ function remove_dlna {
164 164
     iptables -D INPUT -p tcp --dport 8200 -j ACCEPT
165 165
     function_check save_firewall_settings
166 166
     save_firewall_settings
167
-    sed -i '/install_dlna/d' $COMPLETION_FILE
167
+    remove_completion_param install_dlna
168 168
 }
169 169
 
170 170
 function install_dlna_main {

+ 1
- 1
src/freedombone-app-dokuwiki View File

@@ -184,7 +184,7 @@ function remove_dokuwiki {
184 184
     if [ -d /usr/share/dokuwiki ]; then
185 185
         rm -rf /usr/share/dokuwiki
186 186
     fi
187
-    sed -i '/install_dokuwiki/d' $COMPLETION_FILE
187
+    remove_completion_param install_dokuwiki
188 188
 }
189 189
 
190 190
 function get_dokuwiki_admin_password {

+ 2
- 2
src/freedombone-app-gnusocial View File

@@ -366,12 +366,12 @@ function remove_gnusocial {
366 366
     drop_database gnusocial
367 367
     function_check remove_onion_service
368 368
     remove_onion_service gnusocial ${GNUSOCIAL_ONION_PORT}
369
-    sed -i '/install_gnusocial/d' $COMPLETION_FILE
370
-    sed -i '/gnusocial /d' $COMPLETION_FILE
371 369
     if grep -q "gnusocial" /etc/crontab; then
372 370
         sed -i "/gnusocial/d" /etc/crontab
373 371
     fi
374 372
     remove_app gnusocial
373
+    remove_completion_param install_gnusocial
374
+    sed -i '/gnusocial /d' $COMPLETION_FILE
375 375
 }
376 376
 
377 377
 function install_gnusocial_main {

+ 1
- 1
src/freedombone-app-gogs View File

@@ -345,7 +345,7 @@ function remove_gogs {
345 345
     rm /etc/systemd/system/gogs.service
346 346
     rm -rf /home/${GOGS_USERNAME}/*
347 347
     remove_onion_service gogs ${GIT_ONION_PORT} 9418
348
-    sed -i '/install_gogs/d' $COMPLETION_FILE
348
+    remove_completion_param install_gogs
349 349
     sed -i '/gogs /d' $COMPLETION_FILE
350 350
 }
351 351
 

+ 0
- 2
src/freedombone-app-hubzilla View File

@@ -275,7 +275,6 @@ function remove_hubzilla {
275 275
     if [ ${#HUBZILLA_DOMAIN_NAME} -eq 0 ]; then
276 276
         return
277 277
     fi
278
-    echo $'Removing Hubzilla'
279 278
     nginx_dissite $HUBZILLA_DOMAIN_NAME
280 279
     if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then
281 280
         rm -rf /var/www/$HUBZILLA_DOMAIN_NAME
@@ -288,7 +287,6 @@ function remove_hubzilla {
288 287
     function_check remove_onion_service
289 288
     remove_onion_service hubzilla ${HUBZILLA_ONION_PORT}
290 289
     sed -i '/hubzilla/d' $COMPLETION_FILE
291
-    echo $'Hubzilla was removed'
292 290
 }
293 291
 
294 292
 function install_hubzilla {

+ 2
- 2
src/freedombone-app-ipfs View File

@@ -165,9 +165,9 @@ function remove_ipfs_go {
165 165
     iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT
166 166
     function_check save_firewall_settings
167 167
     save_firewall_settings
168
-    sed -i '/install_ipfs/d' $COMPLETION_FILE
168
+    remove_completion_param install_ipfs
169
+    remove_completion_param configure_firewall_for_ipfs
169 170
     sed -i '/ipfs/d' $COMPLETION_FILE
170
-    sed -i '/configure_firewall_for_ipfs/d' $COMPLETION_FILE
171 171
 }
172 172
 
173 173
 function remove_ipfs_js {

+ 2
- 2
src/freedombone-app-irc View File

@@ -247,9 +247,9 @@ function remove_irc {
247 247
     save_firewall_settings
248 248
     function_check remove_onion_service
249 249
     remove_onion_service irc ${IRC_ONION_PORT}
250
-    sed -i '/install_irc/d' ${COMPLETION_FILE}
250
+    remove_completion_param install_irc
251
+    remove_completion_param configure_firewall_for_irc
251 252
     sed -i '/IRC /d' ${COMPLETION_FILE}
252
-    sed -i '/configure_firewall_for_irc/d' ${COMPLETION_FILE}
253 253
 }
254 254
 
255 255
 function configure_firewall_for_irc {

+ 2
- 2
src/freedombone-app-librevault View File

@@ -115,8 +115,8 @@ function remove_librevault {
115 115
     systemctl stop librevault
116 116
     systemctl disable librevault
117 117
     rm /etc/systemd/system/librevault.service
118
-    sed -i '/install_librevault/d' $COMPLETION_FILE
119
-    sed -i '/configure_firewall_for_librevault/d' $COMPLETION_FILE
118
+    remove_completion_param install_librevault
119
+    remove_completion_param configure_firewall_for_librevault
120 120
 }
121 121
 
122 122
 function configure_firewall_for_librevault {

+ 4
- 1
src/freedombone-app-pelican View File

@@ -76,7 +76,10 @@ function restore_remote_pelican {
76 76
 }
77 77
 
78 78
 function remove_pelican {
79
-    echo -n ''
79
+    if [ -d /var/www/$STATIC_BLOG_DOMAIN/htdocs ]; then
80
+        rm -rf /var/www/$STATIC_BLOG_DOMAIN/htdocs
81
+    fi
82
+    pip uninstall pelican
80 83
 }
81 84
 
82 85
 function create_pelican_conf {

+ 2
- 1
src/freedombone-app-rss View File

@@ -261,8 +261,9 @@ function remove_rss {
261 261
     fi
262 262
     function_check drop_database
263 263
     drop_database ttrss
264
-    sed -i '/install_rss/d' $COMPLETION_FILE
264
+    remove_completion_param install_rss
265 265
     sed -i '/RSS /d' $COMPLETION_FILE
266
+    sed -i '/rss /d' $COMPLETION_FILE
266 267
 }
267 268
 
268 269
 function rss_modifications {

+ 1
- 1
src/freedombone-app-searx View File

@@ -109,7 +109,7 @@ function remove_searx {
109 109
     if [ -d ${SEARX_PATH}/searx ]; then
110 110
         rm -rf ${SEARX_PATH}/searx
111 111
     fi
112
-    sed -i '/install_searx/d' $COMPLETION_FILE
112
+    remove_completion_param install_searx
113 113
     sed -i '/Search engine /d' $COMPLETION_FILE
114 114
 }
115 115
 

+ 3
- 3
src/freedombone-app-sip View File

@@ -177,9 +177,9 @@ function remove_sip {
177 177
     if [ -d /etc/turnserver ]; then
178 178
         rm -rf /etc/turnserver
179 179
     fi
180
-    sed -i '/install_sip/d' $COMPLETION_FILE
181
-    sed -i '/configure_firewall_for_turn/d' $COMPLETION_FILE
182
-    sed -i '/configure_firewall_for_sip4/d' $COMPLETION_FILE
180
+    remove_completion_param install_sip
181
+    remove_completion_param configure_firewall_for_turn
182
+    remove_completion_param configure_firewall_for_sip4
183 183
 }
184 184
 
185 185
 function configure_firewall_for_turn {

+ 2
- 2
src/freedombone-app-syncthing View File

@@ -470,8 +470,8 @@ function remove_syncthing {
470 470
     apt-get -y remove --purge syncthing
471 471
     rm /etc/systemd/system/syncthing.service
472 472
     sed -i "/${PROJECT_NAME}-syncthing/d" /etc/crontab
473
-    sed -i '/install_syncthing/d' $COMPLETION_FILE
474
-    sed -i '/configure_firewall_for_syncthing/d' $COMPLETION_FILE
473
+    remove_completion_param install_syncthing
474
+    remove_completion_param configure_firewall_for_syncthing
475 475
     systemctl restart cron
476 476
 }
477 477
 

+ 2
- 2
src/freedombone-app-tahoelafs View File

@@ -198,8 +198,8 @@ function remove_tahoelafs {
198 198
 
199 199
     rm -rf /var/lib/tahoelafs
200 200
 
201
-    sed -i '/install_tahoelafs/d' $COMPLETION_FILE
202
-    sed -i '/configure_firewall_for_tahoelafs/d' $COMPLETION_FILE
201
+    remove_completion_param install_tahoelafs
202
+    remove_completion_param configure_firewall_for_tahoelafs
203 203
 }
204 204
 
205 205
 function configure_firewall_for_tahoelafs {

+ 2
- 2
src/freedombone-app-tox View File

@@ -252,8 +252,8 @@ function remove_tox_node {
252 252
         echo $'Failed to remove tox node'
253 253
         exit 763836
254 254
     fi
255
-    sed -i '/install_tox_node/d' $COMPLETION_FILE
256
-    sed -i '/configure_firewall_for_tox/d' $COMPLETION_FILE
255
+    remove_completion_param install_tox_node
256
+    remove_completion_param configure_firewall_for_tox
257 257
 }
258 258
 
259 259
 function remove_tox_avahi {

+ 1
- 1
src/freedombone-app-vpn View File

@@ -67,7 +67,7 @@ function restore_remote_vpn {
67 67
 
68 68
 function remove_vpn {
69 69
     apt-get -y remove --purge fastd
70
-    sed -i '/install_vpn/d' $COMPLETION_FILE
70
+    remove_completion_param install_vpn
71 71
 }
72 72
 
73 73
 function install_vpn {

+ 2
- 1
src/freedombone-app-webmail View File

@@ -135,7 +135,8 @@ function remove_webmail {
135 135
         rm -rf $WEB_PATH/webmail
136 136
     fi
137 137
     sed -i '/Webmail /d' $COMPLETION_FILE
138
-    sed -i '/install_webmail/d' $COMPLETION_FILE
138
+    sed -i '/webmail /d' $COMPLETION_FILE
139
+    remove_completion_param install_webmail
139 140
 }
140 141
 
141 142
 function install_webmail {

+ 2
- 2
src/freedombone-app-xmpp View File

@@ -262,7 +262,7 @@ function configure_firewall_for_xmpp {
262 262
 
263 263
 function remove_xmpp_client {
264 264
     apt-get -y remove --purge profanity
265
-    sed '/install_xmpp_client/d' $COMPLETION_FILE
265
+    remove_completion_param install_xmpp_client
266 266
 }
267 267
 
268 268
 function remove_xmpp {
@@ -284,7 +284,7 @@ function remove_xmpp {
284 284
         rm -rf /etc/prosody
285 285
     fi
286 286
 
287
-    sed '/install_xmpp/d' $COMPLETION_FILE
287
+    remove_completion_param install_xmpp
288 288
     sed '/xmpp /d' $COMPLETION_FILE
289 289
 }
290 290
 

+ 9
- 8
src/freedombone-app-zeronet View File

@@ -100,24 +100,25 @@ function remove_zeronet_blog {
100 100
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
101 101
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroBlog
102 102
     fi
103
-    sed -i '/install_zeronet_blog/d' $COMPLETION_FILE
103
+    remove_completion_param install_zeronet_blog
104 104
     sed -i '/ZeroNet Blog/d' $COMPLETION_FILE
105
+    sed -i '/zeronet blog/d' $COMPLETION_FILE
105 106
 }
106 107
 
107 108
 function remove_zeronet_mail {
108 109
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
109 110
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroMail
110 111
     fi
111
-    sed -i '/install_zeronet_mail/d' $COMPLETION_FILE
112
-    sed -i '/zeroNet /d' $COMPLETION_FILE
112
+    remove_completion_param install_zeronet_mail
113
+    sed -i '/zeronet mail/d' $COMPLETION_FILE
113 114
 }
114 115
 
115 116
 function remove_zeronet_forum {
116 117
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
117 118
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroTalk
118 119
     fi
119
-    sed -i '/install_zeronet_forum/d' $COMPLETION_FILE
120
-    sed -i '/ZeroNet Forum/d' $COMPLETION_FILE
120
+    remove_completion_param install_zeronet_forum
121
+    sed -i '/zeronet forum/d' $COMPLETION_FILE
121 122
 }
122 123
 
123 124
 function remove_zeronet {
@@ -132,9 +133,9 @@ function remove_zeronet {
132 133
     function_check save_firewall_settings
133 134
     save_firewall_settings
134 135
     ${PROJECT_NAME}-mesh-install -f zeronet --remove yes
135
-    sed -i '/install_zeronet/d' $COMPLETION_FILE
136
-    sed -i '/ZeroNet /d' $COMPLETION_FILE
137
-    sed -i '/configure_firewall_for_zeronet/d' $COMPLETION_FILE
136
+    remove_completion_param install_zeronet
137
+    remove_completion_param configure_firewall_for_zeronet
138
+    sed -i '/zeronet /d' $COMPLETION_FILE
138 139
 }
139 140
 
140 141
 function configure_firewall_for_zeronet {