Ver código fonte

Onion support in for app removals

Bob Mottram 9 anos atrás
pai
commit
6c59300271

+ 2
- 0
src/freedombone-app-blog Ver arquivo

53
 			sed -i "/$FULLBLOG_CODE/d" /usr/bin/dynamicdns
53
 			sed -i "/$FULLBLOG_CODE/d" /usr/bin/dynamicdns
54
 		fi
54
 		fi
55
 	fi
55
 	fi
56
+	function_check remove_onion_service
57
+	remove_onion_service blog ${FULLBLOG_ONION_PORT}
56
 	sed -i '/install_blog/d' $COMPLETION_FILE
58
 	sed -i '/install_blog/d' $COMPLETION_FILE
57
 	sed -i '/Blog .*/d' $COMPLETION_FILE
59
 	sed -i '/Blog .*/d' $COMPLETION_FILE
58
 }
60
 }

+ 2
- 0
src/freedombone-app-gnusocial Ver arquivo

60
 	fi
60
 	fi
61
 	function_check drop_database
61
 	function_check drop_database
62
 	drop_database gnusocial
62
 	drop_database gnusocial
63
+	function_check remove_onion_service
64
+	remove_onion_service microblog ${MICROBLOG_ONION_PORT}
63
 	sed -i '/install_gnu_social/d' $COMPLETION_FILE
65
 	sed -i '/install_gnu_social/d' $COMPLETION_FILE
64
 	sed -i '/GNU Social /d' $COMPLETION_FILE
66
 	sed -i '/GNU Social /d' $COMPLETION_FILE
65
 }
67
 }

+ 1
- 0
src/freedombone-app-gogs Ver arquivo

55
 	drop_database gogs
55
 	drop_database gogs
56
 	rm /etc/systemd/system/gogs.service
56
 	rm /etc/systemd/system/gogs.service
57
 	rm -rf $GOPATH/src/github.com/gogits
57
 	rm -rf $GOPATH/src/github.com/gogits
58
+	remove_onion_service gogs ${GIT_ONION_PORT} 9418
58
 	sed -i '/install_gogs/d' $COMPLETION_FILE
59
 	sed -i '/install_gogs/d' $COMPLETION_FILE
59
 	sed -i '/Gogs /d' $COMPLETION_FILE
60
 	sed -i '/Gogs /d' $COMPLETION_FILE
60
 }
61
 }

+ 2
- 0
src/freedombone-app-hubzilla Ver arquivo

51
 	fi
51
 	fi
52
 	function_check drop_database
52
 	function_check drop_database
53
 	drop_database hubzilla
53
 	drop_database hubzilla
54
+	function_check remove_onion_service
55
+	remove_onion_service hubzilla ${HUBZILLA_ONION_PORT}
54
 	sed -i '/install_hubzilla/d' $COMPLETION_FILE
56
 	sed -i '/install_hubzilla/d' $COMPLETION_FILE
55
 	sed -i '/Hubzilla /d' $COMPLETION_FILE
57
 	sed -i '/Hubzilla /d' $COMPLETION_FILE
56
 }
58
 }

+ 1
- 0
src/freedombone-app-irc Ver arquivo

47
 	iptables -D INPUT -p tcp --dport 1024:65535 --sport $IRC_PORT -j ACCEPT
47
 	iptables -D INPUT -p tcp --dport 1024:65535 --sport $IRC_PORT -j ACCEPT
48
 	function_check save_firewall_settings
48
 	function_check save_firewall_settings
49
 	save_firewall_settings
49
 	save_firewall_settings
50
+	remove_onion_service irc ${IRC_ONION_PORT}
50
 	sed -i '/install_irc_server/d' $COMPLETION_FILE
51
 	sed -i '/install_irc_server/d' $COMPLETION_FILE
51
 	sed -i '/IRC /d' $COMPLETION_FILE
52
 	sed -i '/IRC /d' $COMPLETION_FILE
52
 	sed -i '/configure_firewall_for_irc/d' $COMPLETION_FILE
53
 	sed -i '/configure_firewall_for_irc/d' $COMPLETION_FILE

+ 2
- 0
src/freedombone-app-mumble Ver arquivo

51
 	if [ -f /etc/mumble-server.ini ]; then
51
 	if [ -f /etc/mumble-server.ini ]; then
52
 		rm /etc/mumble-server.ini
52
 		rm /etc/mumble-server.ini
53
 	fi
53
 	fi
54
+	function_check remove_onion_service
55
+	remove_onion_service voip ${VOIP_PORT}
54
 	sed -i '/install_mumble/d' $COMPLETION_FILE
56
 	sed -i '/install_mumble/d' $COMPLETION_FILE
55
 	sed -i '/install_voip/d' $COMPLETION_FILE
57
 	sed -i '/install_voip/d' $COMPLETION_FILE
56
 	sed -i '/configure_firewall_for_voip/d' $COMPLETION_FILE
58
 	sed -i '/configure_firewall_for_voip/d' $COMPLETION_FILE

+ 2
- 0
src/freedombone-app-rss Ver arquivo

45
 		return
45
 		return
46
 	fi
46
 	fi
47
 	nginx_dissite $RSS_READER_DOMAIN_NAME
47
 	nginx_dissite $RSS_READER_DOMAIN_NAME
48
+	function_check remove_onion_service
49
+	remove_onion_service ttrss ${RSS_READER_ONION_PORT} ${RSS_MOBILE_READER_ONION_PORT}
48
 	if [ -f /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME ]; then
50
 	if [ -f /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME ]; then
49
 		rm /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
51
 		rm /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
50
 	fi
52
 	fi

+ 9
- 0
src/freedombone-utils-onion Ver arquivo

59
 	onion_service_port_to=$2
59
 	onion_service_port_to=$2
60
 	sed -i "/hidden_service_${onion_service_name}/d" /etc/tor/torrc
60
 	sed -i "/hidden_service_${onion_service_name}/d" /etc/tor/torrc
61
 	sed -i "/127.0.0.1:${onion_service_port_to}/d" /etc/tor/torrc
61
 	sed -i "/127.0.0.1:${onion_service_port_to}/d" /etc/tor/torrc
62
+	if [ $3 ]; then
63
+		sed -i "/127.0.0.1:${3}/d" /etc/tor/torrc
64
+		if [ $4 ]; then
65
+			sed -i "/127.0.0.1:${4}/d" /etc/tor/torrc
66
+			if [ $5 ]; then
67
+				sed -i "/127.0.0.1:${5}/d" /etc/tor/torrc
68
+			fi
69
+		fi
70
+	fi
62
 	systemctl restart tor
71
 	systemctl restart tor
63
 }
72
 }
64
 
73