Quellcode durchsuchen

Remove removal tests

Bob Mottram vor 8 Jahren
Ursprung
Commit
fe35c30d91

+ 0
- 4
src/freedombone-app-babel Datei anzeigen

@@ -69,10 +69,6 @@ function restore_remote_babel {
69 69
 }
70 70
 
71 71
 function remove_babel {
72
-    if [[ $(app_is_installed babel) == "0" ]]; then
73
-        return
74
-    fi
75
-
76 72
     ${PROJECT_NAME}-mesh-install -f babel --remove yes
77 73
     if [ ! "$?" = "0" ]; then
78 74
         echo $'Failed to remove babel'

+ 0
- 4
src/freedombone-app-batman Datei anzeigen

@@ -83,10 +83,6 @@ function restore_remote_batman {
83 83
 }
84 84
 
85 85
 function remove_batman {
86
-    if [[ $(app_is_installed batman) == "0" ]]; then
87
-        return
88
-    fi
89
-
90 86
     ${PROJECT_NAME}-mesh-install -f batman --remove yes
91 87
     if [ ! "$?" = "0" ]; then
92 88
         echo $'Failed to remove batman'

+ 0
- 3
src/freedombone-app-blog Datei anzeigen

@@ -330,9 +330,6 @@ function restore_remote_blog {
330 330
 }
331 331
 
332 332
 function remove_blog {
333
-    if [[ $(app_is_installed blog) == "0" ]]; then
334
-        return
335
-    fi
336 333
     if [ ${#FULLBLOG_DOMAIN_NAME} -eq 0 ]; then
337 334
         return
338 335
     fi

+ 0
- 3
src/freedombone-app-cjdns Datei anzeigen

@@ -182,9 +182,6 @@ function restore_remote_cjdns {
182 182
 }
183 183
 
184 184
 function remove_cjdns {
185
-    if [[ $(app_is_installed cjdns) == "0" ]]; then
186
-        return
187
-    fi
188 185
     service cjdns stop
189 186
     ip6tables -D nat -D POSTROUTING -o tun0 -j MASQUERADE
190 187
     ip6tables -D FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT

+ 0
- 3
src/freedombone-app-dlna Datei anzeigen

@@ -155,9 +155,6 @@ function restore_remote_dlna {
155 155
 }
156 156
 
157 157
 function remove_dlna {
158
-    if [[ $(app_is_installed dlna) == "0" ]]; then
159
-        return
160
-    fi
161 158
     service minidlna stop
162 159
     apt-get -y remove --purge minidlna
163 160
     if [ -f /etc/minidlna.conf ]; then

+ 0
- 3
src/freedombone-app-emacs Datei anzeigen

@@ -98,9 +98,6 @@ function restore_remote_emacs {
98 98
 }
99 99
 
100 100
 function remove_emacs {
101
-    if [[ $(app_is_installed emacs) == "0" ]]; then
102
-        return
103
-    fi
104 101
     apt-get -y remove --purge emacs24
105 102
     update-alternatives --set editor /usr/bin/nano
106 103
     sed -i '/install_emacs/d' $COMPLETION_FILE

+ 0
- 3
src/freedombone-app-gnusocial Datei anzeigen

@@ -348,9 +348,6 @@ function restore_remote_gnusocial {
348 348
 }
349 349
 
350 350
 function remove_gnusocial {
351
-    if [[ $(app_is_installed gnusocial) == "0" ]]; then
352
-        return
353
-    fi
354 351
     if [ ${#MICROBLOG_DOMAIN_NAME} -eq 0 ]; then
355 352
         return
356 353
     fi

+ 0
- 4
src/freedombone-app-gogs Datei anzeigen

@@ -377,10 +377,6 @@ function restore_remote_gogs {
377 377
 }
378 378
 
379 379
 function remove_gogs {
380
-    if [[ $(app_is_installed gogs) == "0" ]]; then
381
-        return
382
-    fi
383
-
384 380
     if [ ${#GIT_DOMAIN_NAME} -eq 0 ]; then
385 381
         return
386 382
     fi

+ 0
- 3
src/freedombone-app-hubzilla Datei anzeigen

@@ -317,9 +317,6 @@ function restore_remote_hubzilla {
317 317
 }
318 318
 
319 319
 function remove_hubzilla {
320
-    if [[ $(app_is_installed hubzilla) == "0" ]]; then
321
-        return
322
-    fi
323 320
     if [ ${#HUBZILLA_DOMAIN_NAME} -eq 0 ]; then
324 321
         return
325 322
     fi

+ 0
- 6
src/freedombone-app-ipfs Datei anzeigen

@@ -157,9 +157,6 @@ function restore_remote_ipfs {
157 157
 }
158 158
 
159 159
 function remove_ipfs_go {
160
-    if [[ $(app_is_installed ipfs_go) == "0" ]]; then
161
-        return
162
-    fi
163 160
     systemctl stop ipfs
164 161
     systemctl disable ipfs
165 162
     systemctl daemon-reload
@@ -174,9 +171,6 @@ function remove_ipfs_go {
174 171
 }
175 172
 
176 173
 function remove_ipfs_js {
177
-    if [[ $(app_is_installed ipfs_js) == "0" ]]; then
178
-        return
179
-    fi
180 174
     systemctl stop ipfs
181 175
     systemctl disable ipfs
182 176
     rm /etc/systemd/system/ipfs.service

+ 0
- 3
src/freedombone-app-irc Datei anzeigen

@@ -234,9 +234,6 @@ function restore_remote_irc {
234 234
 }
235 235
 
236 236
 function remove_irc {
237
-    if [[ $(app_is_installed irc) == "0" ]]; then
238
-        return
239
-    fi
240 237
     remove_watchdog_daemon ngircd
241 238
     systemctl stop ngircd
242 239
     apt-get -y remove --purge ngircd

+ 0
- 3
src/freedombone-app-librevault Datei anzeigen

@@ -107,9 +107,6 @@ function restore_remote_librevault {
107 107
 }
108 108
 
109 109
 function remove_librevault {
110
-    if [[ $(app_is_installed librevault) == "0" ]]; then
111
-        return
112
-    fi
113 110
     iptables -D INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT
114 111
     iptables -D INPUT -p tcp --dport $LIBREVAULT_PORT -j ACCEPT
115 112
     function_check save_firewall_settings

+ 0
- 3
src/freedombone-app-mumble Datei anzeigen

@@ -152,9 +152,6 @@ function restore_remote_mumble {
152 152
 }
153 153
 
154 154
 function remove_mumble {
155
-    if [[ $(app_is_installed mumble) == "0" ]]; then
156
-        return
157
-    fi
158 155
     apt-get -y remove --purge mumble-server
159 156
     if [[ $ONION_ONLY == "no" ]]; then
160 157
         iptables -D INPUT -p udp --dport $MUMBLE_PORT -j ACCEPT

+ 0
- 3
src/freedombone-app-rss Datei anzeigen

@@ -244,9 +244,6 @@ function restore_remote_rss {
244 244
 }
245 245
 
246 246
 function remove_rss {
247
-    if [[ $(app_is_installed rss) == "0" ]]; then
248
-        return
249
-    fi
250 247
     if [ ${#RSS_READER_DOMAIN_NAME} -eq 0 ]; then
251 248
         return
252 249
     fi

+ 0
- 3
src/freedombone-app-searx Datei anzeigen

@@ -96,9 +96,6 @@ function restore_remote_searx {
96 96
 }
97 97
 
98 98
 function remove_searx {
99
-    if [[ $(app_is_installed searx) == "0" ]]; then
100
-        return
101
-    fi
102 99
     systemctl stop searx
103 100
     systemctl disable searx
104 101
     rm /etc/systemd/system/searx.service

+ 0
- 4
src/freedombone-app-sip Datei anzeigen

@@ -155,10 +155,6 @@ function restore_remote_sip {
155 155
 }
156 156
 
157 157
 function remove_sip {
158
-    if [[ $(app_is_installed sip) == "0" ]]; then
159
-        return
160
-    fi
161
-
162 158
     iptables -D INPUT -p udp --dport $TURN_PORT -j ACCEPT
163 159
     iptables -D INPUT -p tcp --dport $TURN_PORT -j ACCEPT
164 160
     iptables -D INPUT -p tcp --dport $TURN_TLS_PORT -j ACCEPT

+ 0
- 3
src/freedombone-app-syncthing Datei anzeigen

@@ -460,9 +460,6 @@ function restore_remote_syncthing {
460 460
 }
461 461
 
462 462
 function remove_syncthing {
463
-    if ! grep -Fxq "install_syncthing" $COMPLETION_FILE; then
464
-        return
465
-    fi
466 463
     iptables -D INPUT -p udp --dport $SYNCTHING_PORT -j ACCEPT
467 464
     iptables -D INPUT -p tcp --dport $SYNCTHING_PORT -j ACCEPT
468 465
     function_check save_firewall_settings

+ 0
- 3
src/freedombone-app-tahoelafs Datei anzeigen

@@ -183,9 +183,6 @@ function restore_remote_tahoelafs {
183 183
 }
184 184
 
185 185
 function remove_tahoelafs {
186
-    if [[ $(app_is_installed tahoelafs) == "0" ]]; then
187
-        return
188
-    fi
189 186
     iptables -D INPUT -p udp --dport $TAHOELAFS_PORT -j ACCEPT
190 187
     iptables -D INPUT -p tcp --dport $TAHOELAFS_PORT -j ACCEPT
191 188
     function_check save_firewall_settings

+ 0
- 11
src/freedombone-app-tox Datei anzeigen

@@ -224,10 +224,6 @@ function restore_remote_tox {
224 224
 }
225 225
 
226 226
 function remove_tox_node {
227
-    if [[ $(app_is_installed tox_node) == "0" ]]; then
228
-        return
229
-    fi
230
-
231 227
     iptables -D INPUT -p tcp --dport $TOX_PORT -j ACCEPT
232 228
     iptables -D INPUT -p udp --dport $TOX_PORT -j ACCEPT
233 229
     function_check save_firewall_settings
@@ -246,9 +242,6 @@ function remove_tox_node {
246 242
 }
247 243
 
248 244
 function remove_tox_avahi {
249
-    if [[ $(app_is_installed tox_avahi) == "0" ]]; then
250
-        return
251
-    fi
252 245
     cd $INSTALL_DIR/toxid
253 246
     make uninstall
254 247
     rm -rf $INSTALL_DIR/toxid
@@ -256,10 +249,6 @@ function remove_tox_avahi {
256 249
 }
257 250
 
258 251
 function remove_tox_client {
259
-    if [[ $(app_is_installed tox_client) == "0" ]]; then
260
-        return
261
-    fi
262
-
263 252
     ${PROJECT_NAME}-mesh-install -f tox_client --remove yes
264 253
     if [ ! "$?" = "0" ]; then
265 254
         echo $'Could not remove Tox client'

+ 0
- 3
src/freedombone-app-webmail Datei anzeigen

@@ -123,9 +123,6 @@ function restore_remote_webmail {
123 123
 }
124 124
 
125 125
 function remove_webmail {
126
-    if [[ $(app_is_installed webmail) == "0" ]]; then
127
-        return
128
-    fi
129 126
     nginx_dissite webmail
130 127
     if [ -f /etc/nginx/sites-available/webmail ]; then
131 128
         rm /etc/nginx/sites-available/webmail

+ 0
- 3
src/freedombone-app-wiki Datei anzeigen

@@ -210,9 +210,6 @@ function restore_remote_wiki {
210 210
 }
211 211
 
212 212
 function remove_wiki {
213
-    if [[ $(app_is_installed wiki) == "0" ]]; then
214
-        return
215
-    fi
216 213
     if [ ${#WIKI_DOMAIN_NAME} -eq 0 ]; then
217 214
         return
218 215
     fi

+ 0
- 6
src/freedombone-app-xmpp Datei anzeigen

@@ -261,18 +261,12 @@ function configure_firewall_for_xmpp {
261 261
 }
262 262
 
263 263
 function remove_xmpp_client {
264
-    if [[ $(app_is_installed xmpp_client) == "0" ]]; then
265
-        return
266
-    fi
267 264
     apt-get -y remove --purge profanity
268 265
     sed '/install_xmpp_client/d' $COMPLETION_FILE
269 266
 }
270 267
 
271 268
 function remove_xmpp {
272 269
     remove_xmpp_client
273
-    if [[ $(app_is_installed xmpp) == "0" ]]; then
274
-        return
275
-    fi
276 270
     iptables -D INPUT -p tcp --dport 5222:5223 -j ACCEPT
277 271
     iptables -D INPUT -p tcp --dport 5269 -j ACCEPT
278 272
     iptables -D INPUT -p tcp --dport 5280:5281 -j ACCEPT

+ 0
- 12
src/freedombone-app-zeronet Datei anzeigen

@@ -97,9 +97,6 @@ function restore_remote_zeronet {
97 97
 }
98 98
 
99 99
 function remove_zeronet_blog {
100
-    if [[ $(app_is_installed zeronet_blog) == "0" ]]; then
101
-        return
102
-    fi
103 100
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
104 101
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroBlog
105 102
     fi
@@ -108,9 +105,6 @@ function remove_zeronet_blog {
108 105
 }
109 106
 
110 107
 function remove_zeronet_mail {
111
-    if [[ $(app_is_installed zeronet_mail) == "0" ]]; then
112
-        return
113
-    fi
114 108
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
115 109
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroMail
116 110
     fi
@@ -119,9 +113,6 @@ function remove_zeronet_mail {
119 113
 }
120 114
 
121 115
 function remove_zeronet_forum {
122
-    if [[ $(app_is_installed zeronet_forum) == "0" ]]; then
123
-        return
124
-    fi
125 116
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
126 117
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroTalk
127 118
     fi
@@ -133,9 +124,6 @@ function remove_zeronet {
133 124
     remove_zeronet_blog
134 125
     remove_zeronet_mail
135 126
     remove_zeronet_forum
136
-    if [[ $(app_is_installed zeronet) == "0" ]]; then
137
-        return
138
-    fi
139 127
     iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT
140 128
     iptables -D INPUT -i $WIFI_INTERFACE -p tcp --dport $ZERONET_PORT -j ACCEPT
141 129
     iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $TRACKER_PORT -j ACCEPT