Bob Mottram 8 years ago
parent
commit
3d1e580c45

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

@@ -66,7 +66,7 @@ function restore_remote_babel {
66 66
 }
67 67
 
68 68
 function remove_babel {
69
-    if ! grep -Fxq "install_babel" $COMPLETION_FILE; then
69
+    if [[ $(app_is_installed babel) == "0" ]]; then
70 70
         return
71 71
     fi
72 72
 

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

@@ -79,7 +79,7 @@ function restore_remote_batman {
79 79
 }
80 80
 
81 81
 function remove_batman {
82
-    if ! grep -Fxq "install_batman" $COMPLETION_FILE; then
82
+    if [[ $(app_is_installed batman) == "0" ]]; then
83 83
         return
84 84
     fi
85 85
 

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

@@ -311,7 +311,7 @@ function restore_remote_blog {
311 311
 }
312 312
 
313 313
 function remove_blog {
314
-    if ! grep -Fxq "install_blog" $COMPLETION_FILE; then
314
+    if [[ $(app_is_installed blog) == "0" ]]; then
315 315
         return
316 316
     fi
317 317
     if [ ! -d /var/www/$FULLBLOG_DOMAIN_NAME ]; then

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

@@ -171,7 +171,7 @@ function restore_remote_cjdns {
171 171
 }
172 172
 
173 173
 function remove_cjdns {
174
-    if ! grep -Fxq "install_cjdns" $COMPLETION_FILE; then
174
+    if [[ $(app_is_installed cjdns) == "0" ]]; then
175 175
         return
176 176
     fi
177 177
     service cjdns stop

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

@@ -149,7 +149,7 @@ function restore_remote_dlna {
149 149
 }
150 150
 
151 151
 function remove_dlna {
152
-    if ! grep -Fxq "install_dlna" $COMPLETION_FILE; then
152
+    if [[ $(app_is_installed dlna) == "0" ]]; then
153 153
         return
154 154
     fi
155 155
     service minidlna stop

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

@@ -99,7 +99,7 @@ function restore_remote_emacs {
99 99
 }
100 100
 
101 101
 function remove_emacs {
102
-    if ! grep -Fxq "install_emacs" $COMPLETION_FILE; then
102
+    if [[ $(app_is_installed emacs) == "0" ]]; then
103 103
         return
104 104
     fi
105 105
     apt-get -y remove --purge emacs24

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

@@ -337,7 +337,7 @@ function restore_remote_gnusocial {
337 337
 }
338 338
 
339 339
 function remove_gnusocial {
340
-    if ! grep -Fxq "install_gnusocial" $COMPLETION_FILE; then
340
+    if [[ $(app_is_installed gnusocial) == "0" ]]; then
341 341
         return
342 342
     fi
343 343
     nginx_dissite $MICROBLOG_DOMAIN_NAME

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

@@ -396,7 +396,7 @@ function restore_remote_gogs {
396 396
 }
397 397
 
398 398
 function remove_gogs {
399
-    if ! grep -Fxq "install_gogs" $COMPLETION_FILE; then
399
+    if [[ $(app_is_installed gogs) == "0" ]]; then
400 400
         return
401 401
     fi
402 402
 

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

@@ -354,7 +354,7 @@ function restore_remote_hubzilla {
354 354
 }
355 355
 
356 356
 function remove_hubzilla {
357
-    if ! grep -Fxq "Hubzilla domain" $COMPLETION_FILE; then
357
+    if [[ $(app_is_installed hubzilla) == "0" ]]; then
358 358
         return
359 359
     fi
360 360
     echo $'Removing Hubzilla'

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

@@ -151,7 +151,7 @@ function restore_remote_ipfs {
151 151
 }
152 152
 
153 153
 function remove_ipfs_go {
154
-    if ! grep -Fxq "install_ipfs_go" $COMPLETION_FILE; then
154
+    if [[ $(app_is_installed ipfs_go) == "0" ]]; then
155 155
         return
156 156
     fi
157 157
     systemctl stop ipfs
@@ -168,7 +168,7 @@ function remove_ipfs_go {
168 168
 }
169 169
 
170 170
 function remove_ipfs_js {
171
-    if ! grep -Fxq "install_ipfs_js" $COMPLETION_FILE; then
171
+    if [[ $(app_is_installed ipfs_js) == "0" ]]; then
172 172
         return
173 173
     fi
174 174
     systemctl stop ipfs

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

@@ -141,7 +141,7 @@ function restore_remote_irc {
141 141
 }
142 142
 
143 143
 function remove_irc {
144
-    if ! grep -Fxq "install_irc" $COMPLETION_FILE; then
144
+    if [[ $(app_is_installed irc) == "0" ]]; then
145 145
         return
146 146
     fi
147 147
     systemctl stop ngircd

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

@@ -104,7 +104,7 @@ function restore_remote_librevault {
104 104
 }
105 105
 
106 106
 function remove_librevault {
107
-    if ! grep -Fxq "install_librevault" $COMPLETION_FILE; then
107
+    if [[ $(app_is_installed librevault) == "0" ]]; then
108 108
         return
109 109
     fi
110 110
     iptables -D INPUT -p udp --dport $LIBREVAULT_PORT -j ACCEPT

+ 2
- 4
src/freedombone-app-mumble View File

@@ -145,10 +145,8 @@ function restore_remote_mumble {
145 145
 }
146 146
 
147 147
 function remove_mumble {
148
-    if !grep -Fxq "install_mumble" $COMPLETION_FILE; then
149
-        if ! grep -Fxq "install_voip" $COMPLETION_FILE; then
150
-            return
151
-        fi
148
+    if [[ $(app_is_installed mumble) == "0" ]]; then
149
+        return
152 150
     fi
153 151
     apt-get -y remove --purge mumble-server
154 152
     if [[ $ONION_ONLY == "no" ]]; then

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

@@ -253,7 +253,7 @@ function restore_remote_rss {
253 253
 }
254 254
 
255 255
 function remove_rss {
256
-    if ! grep -Fxq "install_rss" $COMPLETION_FILE; then
256
+    if [[ $(app_is_installed rss) == "0" ]]; then
257 257
         return
258 258
     fi
259 259
     nginx_dissite $RSS_READER_DOMAIN_NAME

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

@@ -92,7 +92,7 @@ function restore_remote_searx {
92 92
 }
93 93
 
94 94
 function remove_searx {
95
-    if ! grep -Fxq "install_searx" $COMPLETION_FILE; then
95
+    if [[ $(app_is_installed searx) == "0" ]]; then
96 96
         return
97 97
     fi
98 98
     systemctl stop searx

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

@@ -107,7 +107,7 @@ function restore_remote_sip {
107 107
 }
108 108
 
109 109
 function remove_sip {
110
-    if ! grep -Fxq "install_sip" $COMPLETION_FILE; then
110
+    if [[ $(app_is_installed sip) == "0" ]]; then
111 111
         return
112 112
     fi
113 113
     iptables -D INPUT -p udp --dport $VOIP_TURN_PORT -j ACCEPT

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

@@ -178,7 +178,7 @@ function restore_remote_tahoelafs {
178 178
 }
179 179
 
180 180
 function remove_tahoelafs {
181
-    if ! grep -Fxq "install_tahoelafs" $COMPLETION_FILE; then
181
+    if [[ $(app_is_installed tahoelafs) == "0" ]]; then
182 182
         return
183 183
     fi
184 184
     iptables -D INPUT -p udp --dport $TAHOELAFS_PORT -j ACCEPT

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

@@ -189,7 +189,7 @@ function restore_remote_tox {
189 189
 }
190 190
 
191 191
 function remove_tox_node {
192
-    if ! grep -Fxq "install_tox_node" $COMPLETION_FILE; then
192
+    if [[ $(app_is_installed tox_node) == "0" ]]; then
193 193
         return
194 194
     fi
195 195
 
@@ -211,7 +211,7 @@ function remove_tox_node {
211 211
 }
212 212
 
213 213
 function remove_tox_avahi {
214
-    if ! grep -Fxq "tox_avahi" $COMPLETION_FILE; then
214
+    if [[ $(app_is_installed tox_avahi) == "0" ]]; then
215 215
         return
216 216
     fi
217 217
     cd $INSTALL_DIR/toxid
@@ -221,7 +221,7 @@ function remove_tox_avahi {
221 221
 }
222 222
 
223 223
 function remove_tox_client {
224
-    if ! grep -Fxq "install_tox_client" $COMPLETION_FILE; then
224
+    if [[ $(app_is_installed tox_client) == "0" ]]; then
225 225
         return
226 226
     fi
227 227
 

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

@@ -119,7 +119,7 @@ function restore_remote_webmail {
119 119
 }
120 120
 
121 121
 function remove_webmail {
122
-    if ! grep -Fxq "install_webmail" $COMPLETION_FILE; then
122
+    if [[ $(app_is_installed webmail) == "0" ]]; then
123 123
         return
124 124
     fi
125 125
     nginx_dissite webmail

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

@@ -233,7 +233,7 @@ function restore_remote_wiki {
233 233
 }
234 234
 
235 235
 function remove_wiki {
236
-    if ! grep -Fxq "install_wiki" $COMPLETION_FILE; then
236
+    if [[ $(app_is_installed wiki) == "0" ]]; then
237 237
         return
238 238
     fi
239 239
     function_check remove_onion_service

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

@@ -210,7 +210,7 @@ function configure_firewall_for_xmpp {
210 210
 }
211 211
 
212 212
 function remove_xmpp_client {
213
-    if ! grep -Fxq "install_xmpp_client" $COMPLETION_FILE; then
213
+    if [[ $(app_is_installed xmpp_client) == "0" ]]; then
214 214
         return
215 215
     fi
216 216
     apt-get -y remove --purge profanity
@@ -219,7 +219,7 @@ function remove_xmpp_client {
219 219
 
220 220
 function remove_xmpp {
221 221
     remove_xmpp_client
222
-    if ! grep -Fxq "install_xmpp" $COMPLETION_FILE; then
222
+    if [[ $(app_is_installed xmpp) == "0" ]]; then
223 223
         return
224 224
     fi
225 225
     iptables -D INPUT -p tcp --dport 5222:5223 -j ACCEPT

+ 4
- 4
src/freedombone-app-zeronet View File

@@ -89,7 +89,7 @@ function restore_remote_zeronet {
89 89
 }
90 90
 
91 91
 function remove_zeronet_blog {
92
-    if ! grep -Fxq "install_zeronet_blog" $COMPLETION_FILE; then
92
+    if [[ $(app_is_installed zeronet_blog) == "0" ]]; then
93 93
         return
94 94
     fi
95 95
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
@@ -100,7 +100,7 @@ function remove_zeronet_blog {
100 100
 }
101 101
 
102 102
 function remove_zeronet_mail {
103
-    if ! grep -Fxq "install_zeronet_mail" $COMPLETION_FILE; then
103
+    if [[ $(app_is_installed zeronet_mail) == "0" ]]; then
104 104
         return
105 105
     fi
106 106
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
@@ -111,7 +111,7 @@ function remove_zeronet_mail {
111 111
 }
112 112
 
113 113
 function remove_zeronet_forum {
114
-    if ! grep -Fxq "install_zeronet_forum" $COMPLETION_FILE; then
114
+    if [[ $(app_is_installed zeronet_forum) == "0" ]]; then
115 115
         return
116 116
     fi
117 117
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
@@ -125,7 +125,7 @@ function remove_zeronet {
125 125
     remove_zeronet_blog
126 126
     remove_zeronet_mail
127 127
     remove_zeronet_forum
128
-    if ! grep -Fxq "install_zeronet" $COMPLETION_FILE; then
128
+    if [[ $(app_is_installed zeronet) == "0" ]]; then
129 129
         return
130 130
     fi
131 131
     iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT