Bob Mottram 8 лет назад
Родитель
Сommit
3d1e580c45

+ 1
- 1
src/freedombone-app-babel Просмотреть файл

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

+ 1
- 1
src/freedombone-app-batman Просмотреть файл

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

+ 1
- 1
src/freedombone-app-blog Просмотреть файл

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

+ 1
- 1
src/freedombone-app-cjdns Просмотреть файл

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

+ 1
- 1
src/freedombone-app-dlna Просмотреть файл

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

+ 1
- 1
src/freedombone-app-emacs Просмотреть файл

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

+ 1
- 1
src/freedombone-app-gnusocial Просмотреть файл

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

+ 1
- 1
src/freedombone-app-gogs Просмотреть файл

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

+ 1
- 1
src/freedombone-app-hubzilla Просмотреть файл

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

+ 2
- 2
src/freedombone-app-ipfs Просмотреть файл

151
 }
151
 }
152
 
152
 
153
 function remove_ipfs_go {
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
         return
155
         return
156
     fi
156
     fi
157
     systemctl stop ipfs
157
     systemctl stop ipfs
168
 }
168
 }
169
 
169
 
170
 function remove_ipfs_js {
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
         return
172
         return
173
     fi
173
     fi
174
     systemctl stop ipfs
174
     systemctl stop ipfs

+ 1
- 1
src/freedombone-app-irc Просмотреть файл

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

+ 1
- 1
src/freedombone-app-librevault Просмотреть файл

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

+ 2
- 4
src/freedombone-app-mumble Просмотреть файл

145
 }
145
 }
146
 
146
 
147
 function remove_mumble {
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
     fi
150
     fi
153
     apt-get -y remove --purge mumble-server
151
     apt-get -y remove --purge mumble-server
154
     if [[ $ONION_ONLY == "no" ]]; then
152
     if [[ $ONION_ONLY == "no" ]]; then

+ 1
- 1
src/freedombone-app-rss Просмотреть файл

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

+ 1
- 1
src/freedombone-app-searx Просмотреть файл

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

+ 1
- 1
src/freedombone-app-sip Просмотреть файл

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

+ 1
- 1
src/freedombone-app-tahoelafs Просмотреть файл

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

+ 3
- 3
src/freedombone-app-tox Просмотреть файл

189
 }
189
 }
190
 
190
 
191
 function remove_tox_node {
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
         return
193
         return
194
     fi
194
     fi
195
 
195
 
211
 }
211
 }
212
 
212
 
213
 function remove_tox_avahi {
213
 function remove_tox_avahi {
214
-    if ! grep -Fxq "tox_avahi" $COMPLETION_FILE; then
214
+    if [[ $(app_is_installed tox_avahi) == "0" ]]; then
215
         return
215
         return
216
     fi
216
     fi
217
     cd $INSTALL_DIR/toxid
217
     cd $INSTALL_DIR/toxid
221
 }
221
 }
222
 
222
 
223
 function remove_tox_client {
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
         return
225
         return
226
     fi
226
     fi
227
 
227
 

+ 1
- 1
src/freedombone-app-webmail Просмотреть файл

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

+ 1
- 1
src/freedombone-app-wiki Просмотреть файл

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

+ 2
- 2
src/freedombone-app-xmpp Просмотреть файл

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

+ 4
- 4
src/freedombone-app-zeronet Просмотреть файл

89
 }
89
 }
90
 
90
 
91
 function remove_zeronet_blog {
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
         return
93
         return
94
     fi
94
     fi
95
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
95
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
100
 }
100
 }
101
 
101
 
102
 function remove_zeronet_mail {
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
         return
104
         return
105
     fi
105
     fi
106
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
106
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
111
 }
111
 }
112
 
112
 
113
 function remove_zeronet_forum {
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
         return
115
         return
116
     fi
116
     fi
117
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
117
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
125
     remove_zeronet_blog
125
     remove_zeronet_blog
126
     remove_zeronet_mail
126
     remove_zeronet_mail
127
     remove_zeronet_forum
127
     remove_zeronet_forum
128
-    if ! grep -Fxq "install_zeronet" $COMPLETION_FILE; then
128
+    if [[ $(app_is_installed zeronet) == "0" ]]; then
129
         return
129
         return
130
     fi
130
     fi
131
     iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT
131
     iptables -D INPUT -i $WIFI_INTERFACE -p udp --dport $ZERONET_PORT -j ACCEPT