瀏覽代碼

Removing of apps

Bob Mottram 8 年之前
父節點
當前提交
49eb4e8269

+ 2
- 2
src/freedombone-app-batman 查看文件

88
         echo $'Failed to remove batman'
88
         echo $'Failed to remove batman'
89
         exit 79353
89
         exit 79353
90
     fi
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
 function mesh_install_batman {
95
 function mesh_install_batman {

+ 1
- 1
src/freedombone-app-dlna 查看文件

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

+ 1
- 1
src/freedombone-app-dokuwiki 查看文件

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

+ 2
- 2
src/freedombone-app-gnusocial 查看文件

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

+ 1
- 1
src/freedombone-app-gogs 查看文件

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

+ 0
- 2
src/freedombone-app-hubzilla 查看文件

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

+ 2
- 2
src/freedombone-app-ipfs 查看文件

165
     iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT
165
     iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT
166
     function_check save_firewall_settings
166
     function_check save_firewall_settings
167
     save_firewall_settings
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
     sed -i '/ipfs/d' $COMPLETION_FILE
170
     sed -i '/ipfs/d' $COMPLETION_FILE
170
-    sed -i '/configure_firewall_for_ipfs/d' $COMPLETION_FILE
171
 }
171
 }
172
 
172
 
173
 function remove_ipfs_js {
173
 function remove_ipfs_js {

+ 2
- 2
src/freedombone-app-irc 查看文件

247
     save_firewall_settings
247
     save_firewall_settings
248
     function_check remove_onion_service
248
     function_check remove_onion_service
249
     remove_onion_service irc ${IRC_ONION_PORT}
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
     sed -i '/IRC /d' ${COMPLETION_FILE}
252
     sed -i '/IRC /d' ${COMPLETION_FILE}
252
-    sed -i '/configure_firewall_for_irc/d' ${COMPLETION_FILE}
253
 }
253
 }
254
 
254
 
255
 function configure_firewall_for_irc {
255
 function configure_firewall_for_irc {

+ 2
- 2
src/freedombone-app-librevault 查看文件

115
     systemctl stop librevault
115
     systemctl stop librevault
116
     systemctl disable librevault
116
     systemctl disable librevault
117
     rm /etc/systemd/system/librevault.service
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
 function configure_firewall_for_librevault {
122
 function configure_firewall_for_librevault {

+ 4
- 1
src/freedombone-app-pelican 查看文件

76
 }
76
 }
77
 
77
 
78
 function remove_pelican {
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
 function create_pelican_conf {
85
 function create_pelican_conf {

+ 2
- 1
src/freedombone-app-rss 查看文件

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

+ 1
- 1
src/freedombone-app-searx 查看文件

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

+ 3
- 3
src/freedombone-app-sip 查看文件

177
     if [ -d /etc/turnserver ]; then
177
     if [ -d /etc/turnserver ]; then
178
         rm -rf /etc/turnserver
178
         rm -rf /etc/turnserver
179
     fi
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
 function configure_firewall_for_turn {
185
 function configure_firewall_for_turn {

+ 2
- 2
src/freedombone-app-syncthing 查看文件

470
     apt-get -y remove --purge syncthing
470
     apt-get -y remove --purge syncthing
471
     rm /etc/systemd/system/syncthing.service
471
     rm /etc/systemd/system/syncthing.service
472
     sed -i "/${PROJECT_NAME}-syncthing/d" /etc/crontab
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
     systemctl restart cron
475
     systemctl restart cron
476
 }
476
 }
477
 
477
 

+ 2
- 2
src/freedombone-app-tahoelafs 查看文件

198
 
198
 
199
     rm -rf /var/lib/tahoelafs
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
 function configure_firewall_for_tahoelafs {
205
 function configure_firewall_for_tahoelafs {

+ 2
- 2
src/freedombone-app-tox 查看文件

252
         echo $'Failed to remove tox node'
252
         echo $'Failed to remove tox node'
253
         exit 763836
253
         exit 763836
254
     fi
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
 function remove_tox_avahi {
259
 function remove_tox_avahi {

+ 1
- 1
src/freedombone-app-vpn 查看文件

67
 
67
 
68
 function remove_vpn {
68
 function remove_vpn {
69
     apt-get -y remove --purge fastd
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
 function install_vpn {
73
 function install_vpn {

+ 2
- 1
src/freedombone-app-webmail 查看文件

135
         rm -rf $WEB_PATH/webmail
135
         rm -rf $WEB_PATH/webmail
136
     fi
136
     fi
137
     sed -i '/Webmail /d' $COMPLETION_FILE
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
 function install_webmail {
142
 function install_webmail {

+ 2
- 2
src/freedombone-app-xmpp 查看文件

262
 
262
 
263
 function remove_xmpp_client {
263
 function remove_xmpp_client {
264
     apt-get -y remove --purge profanity
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
 function remove_xmpp {
268
 function remove_xmpp {
284
         rm -rf /etc/prosody
284
         rm -rf /etc/prosody
285
     fi
285
     fi
286
 
286
 
287
-    sed '/install_xmpp/d' $COMPLETION_FILE
287
+    remove_completion_param install_xmpp
288
     sed '/xmpp /d' $COMPLETION_FILE
288
     sed '/xmpp /d' $COMPLETION_FILE
289
 }
289
 }
290
 
290
 

+ 9
- 8
src/freedombone-app-zeronet 查看文件

100
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
100
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroBlog ]; then
101
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroBlog
101
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroBlog
102
     fi
102
     fi
103
-    sed -i '/install_zeronet_blog/d' $COMPLETION_FILE
103
+    remove_completion_param install_zeronet_blog
104
     sed -i '/ZeroNet Blog/d' $COMPLETION_FILE
104
     sed -i '/ZeroNet Blog/d' $COMPLETION_FILE
105
+    sed -i '/zeronet blog/d' $COMPLETION_FILE
105
 }
106
 }
106
 
107
 
107
 function remove_zeronet_mail {
108
 function remove_zeronet_mail {
108
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
109
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroMail ]; then
109
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroMail
110
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroMail
110
     fi
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
 function remove_zeronet_forum {
116
 function remove_zeronet_forum {
116
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
117
     if [ -d $MESH_INSTALL_DIR/zeronet/ZeroTalk ]; then
117
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroTalk
118
         rm -rf $MESH_INSTALL_DIR/zeronet/ZeroTalk
118
     fi
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
 function remove_zeronet {
124
 function remove_zeronet {
132
     function_check save_firewall_settings
133
     function_check save_firewall_settings
133
     save_firewall_settings
134
     save_firewall_settings
134
     ${PROJECT_NAME}-mesh-install -f zeronet --remove yes
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
 function configure_firewall_for_zeronet {
141
 function configure_firewall_for_zeronet {