Browse Source

App interface compliance

Bob Mottram 8 years ago
parent
commit
7a7d4223b6

+ 1
- 1
src/freedombone-adduser View File

288
 	fi
288
 	fi
289
 fi
289
 fi
290
 
290
 
291
-if grep -q "install_gnu_social" $COMPLETION_FILE; then
291
+if grep -q "install_gnusocial" $COMPLETION_FILE; then
292
 	MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
292
 	MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
293
 	if [ -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then
293
 	if [ -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then
294
 		cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
294
 		cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs

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

49
 	echo 'configure_firewall_for_dlna' >> $COMPLETION_FILE
49
 	echo 'configure_firewall_for_dlna' >> $COMPLETION_FILE
50
 }
50
 }
51
 
51
 
52
-function backup_dlna_server {
52
+function backup_dlna {
53
     echo ''
53
     echo ''
54
 }
54
 }
55
 
55
 
56
-function remove_dlna_server {
57
-	if ! grep -Fxq "install_dlna_server" $COMPLETION_FILE; then
56
+function remove_dlna {
57
+	if ! grep -Fxq "install_dlna" $COMPLETION_FILE; then
58
 		return
58
 		return
59
 	fi
59
 	fi
60
 	service minidlna stop
60
 	service minidlna stop
66
 	iptables -D INPUT -p tcp --dport 8200 -j ACCEPT
66
 	iptables -D INPUT -p tcp --dport 8200 -j ACCEPT
67
 	function_check save_firewall_settings
67
 	function_check save_firewall_settings
68
 	save_firewall_settings
68
 	save_firewall_settings
69
-	sed -i '/install_dlna_server/d' $COMPLETION_FILE
69
+	sed -i '/install_dlna/d' $COMPLETION_FILE
70
 }
70
 }
71
 
71
 
72
-function install_dlna_server {
73
-	if grep -Fxq "install_dlna_server" $COMPLETION_FILE; then
72
+function install_dlna {
73
+	if grep -Fxq "install_dlna" $COMPLETION_FILE; then
74
 		return
74
 		return
75
 	fi
75
 	fi
76
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
76
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
121
 
121
 
122
 	function_check configure_firewall_for_dlna
122
 	function_check configure_firewall_for_dlna
123
 	configure_firewall_for_dlna
123
 	configure_firewall_for_dlna
124
-	echo 'install_dlna_server' >> $COMPLETION_FILE
124
+	echo 'install_dlna' >> $COMPLETION_FILE
125
 }
125
 }
126
 
126
 
127
 function script_for_attaching_usb_drive {
127
 function script_for_attaching_usb_drive {

src/freedombone-app-editor → src/freedombone-app-emacs View File

8
 #
8
 #
9
 #                    Freedom in the Cloud
9
 #                    Freedom in the Cloud
10
 #
10
 #
11
-# Editor applications
11
+# Emacs application
12
 #
12
 #
13
 # License
13
 # License
14
 # =======
14
 # =======
28
 # You should have received a copy of the GNU Affero General Public License
28
 # You should have received a copy of the GNU Affero General Public License
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
-function install_editor {
32
-	if grep -Fxq "install_editor" $COMPLETION_FILE; then
31
+function backup_emacs {
32
+	echo ''
33
+}
34
+
35
+function remove_emacs {
36
+	if ! grep -Fxq "install_emacs" $COMPLETION_FILE; then
37
+		return
38
+	fi
39
+	apt-get -y remove --purge emacs24
40
+	update-alternatives --set editor /usr/bin/nano
41
+	sed -i '/install_emacs/d' $COMPLETION_FILE
42
+}
43
+
44
+function install_emacs {
45
+	if grep -Fxq "install_emacs" $COMPLETION_FILE; then
33
 		return
46
 		return
34
 	fi
47
 	fi
35
 	update-alternatives --set editor /usr/bin/emacs24
48
 	update-alternatives --set editor /usr/bin/emacs24
107
 	cp /home/$MY_USERNAME/.emacs /root/.emacs
120
 	cp /home/$MY_USERNAME/.emacs /root/.emacs
108
 	chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.emacs
121
 	chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.emacs
109
 
122
 
110
-	echo 'install_editor' >> $COMPLETION_FILE
123
+	echo 'install_emacs' >> $COMPLETION_FILE
111
 }
124
 }
112
 
125
 
113
 # NOTE: deliberately no exit 0
126
 # NOTE: deliberately no exit 0

+ 12
- 4
src/freedombone-app-email View File

78
 # refresh gpg keys every few hours
78
 # refresh gpg keys every few hours
79
 REFRESH_GPG_KEYS_HOURS=2
79
 REFRESH_GPG_KEYS_HOURS=2
80
 
80
 
81
+function backup_email {
82
+	echo ''
83
+}
84
+
81
 function configure_firewall_for_email {
85
 function configure_firewall_for_email {
82
 	if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
86
 	if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" ]]; then
83
 		return
87
 		return
701
 	fi
705
 	fi
702
 }
706
 }
703
 
707
 
704
-function configure_email {
708
+function remove_email {
709
+	echo ''
710
+}
711
+
712
+function install_email {
705
 	if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
713
 	if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
706
 		return
714
 		return
707
 	fi
715
 	fi
708
-	if grep -Fxq "configure_email" $COMPLETION_FILE; then
716
+	if grep -Fxq "install_email" $COMPLETION_FILE; then
709
 		return
717
 		return
710
 	fi
718
 	fi
711
 	apt-get -y remove postfix
719
 	apt-get -y remove postfix
928
 
936
 
929
 	function_check configure_firewall_for_email
937
 	function_check configure_firewall_for_email
930
 	configure_firewall_for_email
938
 	configure_firewall_for_email
931
-	echo 'configure_email' >> $COMPLETION_FILE
939
+	echo 'install_email' >> $COMPLETION_FILE
932
 }
940
 }
933
 
941
 
934
 function create_procmail {
942
 function create_procmail {
1470
 		MY_GPG_PUBLIC_KEY=/tmp/public_key.gpg
1478
 		MY_GPG_PUBLIC_KEY=/tmp/public_key.gpg
1471
 		su -c "gpg --output $MY_GPG_PUBLIC_KEY --armor --export $MY_GPG_PUBLIC_KEY_ID" - $MY_USERNAME
1479
 		su -c "gpg --output $MY_GPG_PUBLIC_KEY --armor --export $MY_GPG_PUBLIC_KEY_ID" - $MY_USERNAME
1472
 
1480
 
1473
-		if grep -q "configure_email" $COMPLETION_FILE; then
1481
+		if grep -q "install_email" $COMPLETION_FILE; then
1474
 			if ! grep -q $"Change your GPG password" /home/$MY_USERNAME/README; then
1482
 			if ! grep -q $"Change your GPG password" /home/$MY_USERNAME/README; then
1475
 				echo '' >> /home/$MY_USERNAME/README
1483
 				echo '' >> /home/$MY_USERNAME/README
1476
 				echo '' >> /home/$MY_USERNAME/README
1484
 				echo '' >> /home/$MY_USERNAME/README

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

47
 SHARINGS_THEME_REPO="http://git.lasindias.club/manuel/SharingsTheme"
47
 SHARINGS_THEME_REPO="http://git.lasindias.club/manuel/SharingsTheme"
48
 SHARINGS_THEME_COMMIT='7106c7ef03'
48
 SHARINGS_THEME_COMMIT='7106c7ef03'
49
 
49
 
50
-function backup_gnu_social {
50
+function backup_gnusocial {
51
     echo ''
51
     echo ''
52
 }
52
 }
53
 
53
 
54
-function remove_gnu_social {
55
-	if ! grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
54
+function remove_gnusocial {
55
+	if ! grep -Fxq "install_gnusocial" $COMPLETION_FILE; then
56
 		return
56
 		return
57
 	fi
57
 	fi
58
 	nginx_dissite $MICROBLOG_DOMAIN_NAME
58
 	nginx_dissite $MICROBLOG_DOMAIN_NAME
66
 	drop_database gnusocial
66
 	drop_database gnusocial
67
 	function_check remove_onion_service
67
 	function_check remove_onion_service
68
 	remove_onion_service microblog ${MICROBLOG_ONION_PORT}
68
 	remove_onion_service microblog ${MICROBLOG_ONION_PORT}
69
-	sed -i '/install_gnu_social/d' $COMPLETION_FILE
69
+	sed -i '/install_gnusocial/d' $COMPLETION_FILE
70
 	sed -i '/GNU Social /d' $COMPLETION_FILE
70
 	sed -i '/GNU Social /d' $COMPLETION_FILE
71
 }
71
 }
72
 
72
 
73
-function install_gnu_social {
73
+function install_gnusocial {
74
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
74
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
75
 		return
75
 		return
76
 	fi
76
 	fi
96
 	echo 'fi' >> /etc/cron.hourly/gnusocial-daemons
96
 	echo 'fi' >> /etc/cron.hourly/gnusocial-daemons
97
 	chmod +x /etc/cron.hourly/gnusocial-daemons
97
 	chmod +x /etc/cron.hourly/gnusocial-daemons
98
 
98
 
99
-	if grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
99
+	if grep -Fxq "install_gnusocial" $COMPLETION_FILE; then
100
 		return
100
 		return
101
 	fi
101
 	fi
102
 
102
 
360
 	echo "GNU Social onion domain:${MICROBLOG_ONION_HOSTNAME}" >> $COMPLETION_FILE
360
 	echo "GNU Social onion domain:${MICROBLOG_ONION_HOSTNAME}" >> $COMPLETION_FILE
361
 
361
 
362
 	echo "GNU Social domain:$MICROBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
362
 	echo "GNU Social domain:$MICROBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
363
-	echo 'install_gnu_social' >> $COMPLETION_FILE
363
+	echo 'install_gnusocial' >> $COMPLETION_FILE
364
 }
364
 }
365
 
365
 
366
-function install_gnu_social_plugin_sharings {
366
+function install_gnusocial_plugin_sharings {
367
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
367
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
368
 		return
368
 		return
369
 	fi
369
 	fi
377
 	function_check set_repo_commit
377
 	function_check set_repo_commit
378
 	set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins "GNU Social sharings plugin commit" "$SHARINGS_COMMIT" $SHARINGS_REPO
378
 	set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins "GNU Social sharings plugin commit" "$SHARINGS_COMMIT" $SHARINGS_REPO
379
 
379
 
380
-	if grep -Fxq "install_gnu_social_plugin_sharings" $COMPLETION_FILE; then
380
+	if grep -Fxq "install_gnusocial_plugin_sharings" $COMPLETION_FILE; then
381
 		return
381
 		return
382
 	fi
382
 	fi
383
 
383
 
422
 	else
422
 	else
423
 		sed -i "s|GNU Social sharings plugin commit.*|GNU Social sharings plugin commit:$SHARINGS_COMMIT|g" $COMPLETION_FILE
423
 		sed -i "s|GNU Social sharings plugin commit.*|GNU Social sharings plugin commit:$SHARINGS_COMMIT|g" $COMPLETION_FILE
424
 	fi
424
 	fi
425
-	echo 'install_gnu_social_plugin_sharings' >> $COMPLETION_FILE
425
+	echo 'install_gnusocial_plugin_sharings' >> $COMPLETION_FILE
426
 }
426
 }
427
 
427
 
428
-function install_gnu_social_plugin_sharings_theme {
428
+function install_gnusocial_plugin_sharings_theme {
429
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
429
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
430
 		return
430
 		return
431
 	fi
431
 	fi
439
 	function_check set_repo_commit
439
 	function_check set_repo_commit
440
 	set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins "GNU Social sharings theme plugin commit" "$SHARINGS_THEME_COMMIT" $SHARINGS_THEME_REPO
440
 	set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins "GNU Social sharings theme plugin commit" "$SHARINGS_THEME_COMMIT" $SHARINGS_THEME_REPO
441
 
441
 
442
-	if grep -Fxq "install_gnu_social_plugin_sharings_theme" $COMPLETION_FILE; then
442
+	if grep -Fxq "install_gnusocial_plugin_sharings_theme" $COMPLETION_FILE; then
443
 		return
443
 		return
444
 	fi
444
 	fi
445
 
445
 
472
 	else
472
 	else
473
 		sed -i "s|GNU Social sharings plugin theme commit.*|GNU Social sharings plugin theme commit:$SHARINGS_THEME_COMMIT|g" $COMPLETION_FILE
473
 		sed -i "s|GNU Social sharings plugin theme commit.*|GNU Social sharings plugin theme commit:$SHARINGS_THEME_COMMIT|g" $COMPLETION_FILE
474
 	fi
474
 	fi
475
-	echo 'install_gnu_social_plugin_sharings_theme' >> $COMPLETION_FILE
475
+	echo 'install_gnusocial_plugin_sharings_theme' >> $COMPLETION_FILE
476
 }
476
 }
477
 
477
 
478
 function expire_gnu_social_posts {
478
 function expire_gnu_social_posts {
533
 	fi
533
 	fi
534
 }
534
 }
535
 
535
 
536
-function install_gnu_social_theme {
536
+function install_gnusocial_theme {
537
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
537
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
538
 		return
538
 		return
539
 	fi
539
 	fi
549
 		fi
549
 		fi
550
 	fi
550
 	fi
551
 
551
 
552
-	if grep -Fxq "install_gnu_social_theme" $COMPLETION_FILE; then
552
+	if grep -Fxq "install_gnusocial_theme" $COMPLETION_FILE; then
553
 		return
553
 		return
554
 	fi
554
 	fi
555
 
555
 
633
 
633
 
634
 	chown -R www-data:www-data /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
634
 	chown -R www-data:www-data /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
635
 
635
 
636
-	echo 'install_gnu_social_theme' >> $COMPLETION_FILE
636
+	echo 'install_gnusocial_theme' >> $COMPLETION_FILE
637
 }
637
 }
638
 
638
 
639
-function install_gnu_social_markdown {
639
+function install_gnusocial_markdown {
640
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
640
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
641
 		return
641
 		return
642
 	fi
642
 	fi
647
 	function_check set_repo_commit
647
 	function_check set_repo_commit
648
 	set_repo_commit $MICROBLOG_PATH/local/plugins/Markdown "GNU Social Markdown commit" "$MICROBLOG_MARKDOWN_COMMIT" $MICROBLOG_MARKDOWN_REPO
648
 	set_repo_commit $MICROBLOG_PATH/local/plugins/Markdown "GNU Social Markdown commit" "$MICROBLOG_MARKDOWN_COMMIT" $MICROBLOG_MARKDOWN_REPO
649
 
649
 
650
-	if grep -Fxq "install_gnu_social_markdown" $COMPLETION_FILE; then
650
+	if grep -Fxq "install_gnusocial_markdown" $COMPLETION_FILE; then
651
 		return
651
 		return
652
 	fi
652
 	fi
653
 
653
 
678
 
678
 
679
 	chown -R www-data:www-data $MICROBLOG_PATH
679
 	chown -R www-data:www-data $MICROBLOG_PATH
680
 
680
 
681
-	echo 'install_gnu_social_markdown' >> $COMPLETION_FILE
681
+	echo 'install_gnusocial_markdown' >> $COMPLETION_FILE
682
 }
682
 }
683
 
683
 
684
 # NOTE: deliberately there is no "exit 0"
684
 # NOTE: deliberately there is no "exit 0"

+ 9
- 8
src/freedombone-app-irc View File

34
 # An optional password to log into IRC. This applies to all users
34
 # An optional password to log into IRC. This applies to all users
35
 IRC_PASSWORD=
35
 IRC_PASSWORD=
36
 
36
 
37
-function backup_irc_server {
38
-    echo ''
37
+function backup_irc {
38
+	echo ''
39
 }
39
 }
40
 
40
 
41
-function remove_irc_server {
42
-	if ! grep -Fxq "install_irc_server" $COMPLETION_FILE; then
41
+function remove_irc {
42
+	if ! grep -Fxq "install_irc" $COMPLETION_FILE; then
43
 		return
43
 		return
44
 	fi
44
 	fi
45
 	systemctl stop ngircd
45
 	systemctl stop ngircd
46
 	apt-get -y remove --purge ngircd
46
 	apt-get -y remove --purge ngircd
47
+	apt-get -y remove --purge irssi
47
 	if [ -d /etc/ngircd ]; then
48
 	if [ -d /etc/ngircd ]; then
48
 		rm -rf /etc/ngircd
49
 		rm -rf /etc/ngircd
49
 	fi
50
 	fi
53
 	save_firewall_settings
54
 	save_firewall_settings
54
 	function_check remove_onion_service
55
 	function_check remove_onion_service
55
 	remove_onion_service irc ${IRC_ONION_PORT}
56
 	remove_onion_service irc ${IRC_ONION_PORT}
56
-	sed -i '/install_irc_server/d' $COMPLETION_FILE
57
+	sed -i '/install_irc/d' $COMPLETION_FILE
57
 	sed -i '/IRC /d' $COMPLETION_FILE
58
 	sed -i '/IRC /d' $COMPLETION_FILE
58
 	sed -i '/configure_firewall_for_irc/d' $COMPLETION_FILE
59
 	sed -i '/configure_firewall_for_irc/d' $COMPLETION_FILE
59
 }
60
 }
81
 	echo 'configure_firewall_for_irc' >> $COMPLETION_FILE
82
 	echo 'configure_firewall_for_irc' >> $COMPLETION_FILE
82
 }
83
 }
83
 
84
 
84
-function install_irc_server {
85
+function install_irc {
85
 	if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
86
 	if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
86
 		return
87
 		return
87
 	fi
88
 	fi
88
-	if grep -Fxq "install_irc_server" $COMPLETION_FILE; then
89
+	if grep -Fxq "install_irc" $COMPLETION_FILE; then
89
 		return
90
 		return
90
 	fi
91
 	fi
91
 	apt-get -y install ngircd
92
 	apt-get -y install ngircd
199
 
200
 
200
 	function_check configure_firewall_for_irc
201
 	function_check configure_firewall_for_irc
201
 	configure_firewall_for_irc
202
 	configure_firewall_for_irc
202
-	echo 'install_irc_server' >> $COMPLETION_FILE
203
+	echo 'install_irc' >> $COMPLETION_FILE
203
 }
204
 }
204
 
205
 
205
 function install_irc_client {
206
 function install_irc_client {

+ 4
- 0
src/freedombone-app-mediagoblin View File

39
     echo ''
39
     echo ''
40
 }
40
 }
41
 
41
 
42
+function remove_mediagoblin {
43
+    echo ''
44
+}
45
+
42
 function install_mediagoblin {
46
 function install_mediagoblin {
43
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
47
 	if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
44
 		return
48
 		return

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

40
 RSS_READER_GNUSOCIAL_REPO="https://github.com/bashrc/ttrss-gnusocial"
40
 RSS_READER_GNUSOCIAL_REPO="https://github.com/bashrc/ttrss-gnusocial"
41
 RSS_READER_GNUSOCIAL_COMMIT='8b92b8f5db7b0d12459c7bd86a50f48815efe642'
41
 RSS_READER_GNUSOCIAL_COMMIT='8b92b8f5db7b0d12459c7bd86a50f48815efe642'
42
 
42
 
43
-function backup_rss_reader {
43
+function backup_rss {
44
     echo ''
44
     echo ''
45
 }
45
 }
46
 
46
 
47
-function remove_rss_reader {
48
-	if ! grep -Fxq "install_rss_reader" $COMPLETION_FILE; then
47
+function remove_rss {
48
+	if ! grep -Fxq "install_rss" $COMPLETION_FILE; then
49
 		return
49
 		return
50
 	fi
50
 	fi
51
 	nginx_dissite $RSS_READER_DOMAIN_NAME
51
 	nginx_dissite $RSS_READER_DOMAIN_NAME
59
 	fi
59
 	fi
60
 	function_check drop_database
60
 	function_check drop_database
61
 	drop_database ttrss
61
 	drop_database ttrss
62
-	sed -i '/install_rss_reader/d' $COMPLETION_FILE
62
+	sed -i '/install_rss/d' $COMPLETION_FILE
63
 	sed -i '/RSS /d' $COMPLETION_FILE
63
 	sed -i '/RSS /d' $COMPLETION_FILE
64
 }
64
 }
65
 
65
 
66
-function rss_reader_modifications {
66
+function rss_modifications {
67
 	# modify the rss reader to use a socks5 proxy rather than a http proxy
67
 	# modify the rss reader to use a socks5 proxy rather than a http proxy
68
 	if [ ! -d $RSS_READER_PATH ]; then
68
 	if [ ! -d $RSS_READER_PATH ]; then
69
 		return
69
 		return
80
 	chmod a+x $RSS_READER_PATH
80
 	chmod a+x $RSS_READER_PATH
81
 }
81
 }
82
 
82
 
83
-function install_rss_reader {
83
+function install_rss {
84
 	if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
84
 	if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
85
 		return
85
 		return
86
 	fi
86
 	fi
89
 	function_check set_repo_commit
89
 	function_check set_repo_commit
90
 	set_repo_commit $RSS_READER_PATH "RSS reader commit" "$RSS_READER_COMMIT" $RSS_READER_REPO
90
 	set_repo_commit $RSS_READER_PATH "RSS reader commit" "$RSS_READER_COMMIT" $RSS_READER_REPO
91
 
91
 
92
-	if grep -Fxq "install_rss_reader" $COMPLETION_FILE; then
92
+	if grep -Fxq "install_rss" $COMPLETION_FILE; then
93
 		return
93
 		return
94
 	fi
94
 	fi
95
 
95
 
120
 	function_check repair_databases_script
120
 	function_check repair_databases_script
121
 	repair_databases_script
121
 	repair_databases_script
122
 
122
 
123
-	function_check get_mariadb_rss_reader_admin_password
124
-	get_mariadb_rss_reader_admin_password
123
+	function_check get_mariadb_rss_admin_password
124
+	get_mariadb_rss_admin_password
125
 	if [ ! $RSS_READER_ADMIN_PASSWORD ]; then
125
 	if [ ! $RSS_READER_ADMIN_PASSWORD ]; then
126
 		if [ -f $IMAGE_PASSWORD_FILE ]; then
126
 		if [ -f $IMAGE_PASSWORD_FILE ]; then
127
 			RSS_READER_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
127
 			RSS_READER_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
286
 	function_check run_query
286
 	function_check run_query
287
 	run_query ttrss "update ttrss_users set pwd_hash = 'SHA1:${RSS_READER_ADMIN_PASSWORD_HASH}', salt= '' WHERE login = 'admin';"
287
 	run_query ttrss "update ttrss_users set pwd_hash = 'SHA1:${RSS_READER_ADMIN_PASSWORD_HASH}', salt= '' WHERE login = 'admin';"
288
 
288
 
289
-	function_check rss_reader_modifications
290
-	rss_reader_modifications
289
+	function_check rss_modifications
290
+	rss_modifications
291
 
291
 
292
 	function_check configure_php
292
 	function_check configure_php
293
 	configure_php
293
 	configure_php
334
 		chmod 600 /home/$MY_USERNAME/README
334
 		chmod 600 /home/$MY_USERNAME/README
335
 	fi
335
 	fi
336
 
336
 
337
-	echo 'install_rss_reader' >> $COMPLETION_FILE
337
+	echo 'install_rss' >> $COMPLETION_FILE
338
 }
338
 }
339
 
339
 
340
-function install_rss_reader_gnusocial {
340
+function install_rss_gnusocial {
341
 	if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
341
 	if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
342
 		return
342
 		return
343
 	fi
343
 	fi
356
 	set_repo_commit $RSS_READER_GNUSOCIAL_PATH "RSS reader gnusocial commit" "$RSS_READER_GNUSOCIAL_COMMIT" $RSS_READER_GNUSOCIAL_REPO
356
 	set_repo_commit $RSS_READER_GNUSOCIAL_PATH "RSS reader gnusocial commit" "$RSS_READER_GNUSOCIAL_COMMIT" $RSS_READER_GNUSOCIAL_REPO
357
 	chown -R www-data:www-data $RSS_READER_GNUSOCIAL_PATH
357
 	chown -R www-data:www-data $RSS_READER_GNUSOCIAL_PATH
358
 
358
 
359
-	if grep -Fxq "install_rss_reader_gnusocial" $COMPLETION_FILE; then
359
+	if grep -Fxq "install_rss_gnusocial" $COMPLETION_FILE; then
360
 		return
360
 		return
361
 	fi
361
 	fi
362
 
362
 
379
 	fi
379
 	fi
380
 	chown -R www-data:www-data $RSS_READER_GNUSOCIAL_PATH
380
 	chown -R www-data:www-data $RSS_READER_GNUSOCIAL_PATH
381
 
381
 
382
-	echo 'install_rss_reader_gnusocial' >> $COMPLETION_FILE
382
+	echo 'install_rss_gnusocial' >> $COMPLETION_FILE
383
 }
383
 }
384
 
384
 
385
 function install_rss_mobile_reader {
385
 function install_rss_mobile_reader {

src/freedombone-app-search → src/freedombone-app-searx View File

8
 #
8
 #
9
 #                    Freedom in the Cloud
9
 #                    Freedom in the Cloud
10
 #
10
 #
11
-# Search engine application
11
+# Searx engine application
12
 #
12
 #
13
 # License
13
 # License
14
 # =======
14
 # =======
28
 # You should have received a copy of the GNU Affero General Public License
28
 # You should have received a copy of the GNU Affero General Public License
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
-SEARCH_ENGINE_REPO="https://github.com/asciimoo/searx"
32
-SEARCH_ENGINE_COMMIT='fee556c9904637051a9ba874ba7e71cd9f10789f'
33
-SEARCH_ENGINE_PATH=/etc
34
-SEARCH_ENGINE_ONION_PORT=8094
35
-SEARCH_ENGINE_ONION_HOSTNAME=
36
-SEARCH_ENGINE_LOGIN_TEXT=$"Search engine login"
37
-SEARCH_ENGINE_PASSWORD=
31
+SEARX_REPO="https://github.com/asciimoo/searx"
32
+SEARX_COMMIT='fee556c9904637051a9ba874ba7e71cd9f10789f'
33
+SEARX_PATH=/etc
34
+SEARX_ONION_PORT=8094
35
+SEARX_ONION_HOSTNAME=
36
+SEARX_LOGIN_TEXT=$"Search engine login"
37
+SEARX_PASSWORD=
38
 
38
 
39
-function backup_search_engine {
40
-    echo ''
39
+function backup_searx {
40
+	echo ''
41
 }
41
 }
42
 
42
 
43
-function remove_search_engine {
44
-	if ! grep -Fxq "install_search_engine" $COMPLETION_FILE; then
43
+function remove_searx {
44
+	if ! grep -Fxq "install_searx" $COMPLETION_FILE; then
45
 		return
45
 		return
46
 	fi
46
 	fi
47
 	systemctl stop searx
47
 	systemctl stop searx
48
 	systemctl disable searx
48
 	systemctl disable searx
49
 	rm /etc/systemd/system/searx.service
49
 	rm /etc/systemd/system/searx.service
50
 	function_check remove_onion_service
50
 	function_check remove_onion_service
51
-	remove_onion_service searx ${SEARCH_ENGINE_ONION_PORT}
51
+	remove_onion_service searx ${SEARX_ONION_PORT}
52
 	userdel -r searx
52
 	userdel -r searx
53
 	nginx_dissite searx
53
 	nginx_dissite searx
54
 	if [ -f /etc/nginx/sites-available/searx ]; then
54
 	if [ -f /etc/nginx/sites-available/searx ]; then
55
 		rm /etc/nginx/sites-available/searx
55
 		rm /etc/nginx/sites-available/searx
56
 	fi
56
 	fi
57
-	if [ -d ${SEARCH_ENGINE_PATH}/searx ]; then
58
-		rm -rf ${SEARCH_ENGINE_PATH}/searx
57
+	if [ -d ${SEARX_PATH}/searx ]; then
58
+		rm -rf ${SEARX_PATH}/searx
59
 	fi
59
 	fi
60
-	sed -i '/install_search_engine/d' $COMPLETION_FILE
60
+	sed -i '/install_searx/d' $COMPLETION_FILE
61
 	sed -i '/Search engine /d' $COMPLETION_FILE
61
 	sed -i '/Search engine /d' $COMPLETION_FILE
62
 }
62
 }
63
 
63
 
64
-function install_search_engine {
64
+function install_searx {
65
 	# Note: currently socks5 outgoing proxies to other search engines does not work
65
 	# Note: currently socks5 outgoing proxies to other search engines does not work
66
 	if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
66
 	if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
67
 		return
67
 		return
72
 	fi
72
 	fi
73
 
73
 
74
 	# update to a new commit if needed
74
 	# update to a new commit if needed
75
-	set_repo_commit $SEARCH_ENGINE_PATH/searx "Search engine commit" "$SEARCH_ENGINE_COMMIT" $SEARCH_ENGINE_REPO
75
+	set_repo_commit $SEARX_PATH/searx "Search engine commit" "$SEARX_COMMIT" $SEARX_REPO
76
 	if grep "Search engine key" $COMPLETION_FILE; then
76
 	if grep "Search engine key" $COMPLETION_FILE; then
77
-		if [ -f ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml ]; then
77
+		if [ -f ${SEARX_PATH}/searx/searx/settings.yml ]; then
78
 			# note: this might change to a --tor option in a later version
78
 			# note: this might change to a --tor option in a later version
79
-			if ! grep 'socks5://127.0.0.1:9050' ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml; then
80
-				echo 'outgoing: # communication with search engines' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
81
-				echo '    proxies:' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
82
-				echo '        http : socks5://127.0.0.1:9050' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
83
-				echo '        https: socks5://127.0.0.1:9050' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
79
+			if ! grep 'socks5://127.0.0.1:9050' ${SEARX_PATH}/searx/searx/settings.yml; then
80
+				echo 'outgoing: # communication with search engines' >> ${SEARX_PATH}/searx/searx/settings.yml
81
+				echo '    proxies:' >> ${SEARX_PATH}/searx/searx/settings.yml
82
+				echo '        http : socks5://127.0.0.1:9050' >> ${SEARX_PATH}/searx/searx/settings.yml
83
+				echo '        https: socks5://127.0.0.1:9050' >> ${SEARX_PATH}/searx/searx/settings.yml
84
 			fi
84
 			fi
85
-			SEARCH_ENGINE_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}')
86
-			sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
85
+			SEARX_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}')
86
+			sed -i "s|secret_key.*|secret_key : \"${SEARX_SECRET_KEY}\"|g" ${SEARX_PATH}/searx/searx/settings.yml
87
 			if [ -f /var/lib/tor/hidden_service_searx/hostname ]; then
87
 			if [ -f /var/lib/tor/hidden_service_searx/hostname ]; then
88
-				SEARCH_ENGINE_ONION_HOSTNAME=$(echo /var/lib/tor/hidden_service_searx/hostname)
89
-				sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\/' ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
88
+				SEARX_ONION_HOSTNAME=$(echo /var/lib/tor/hidden_service_searx/hostname)
89
+				sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARX_ONION_HOSTNAME}\/' ${SEARX_PATH}/searx/searx/settings.yml
90
 			fi
90
 			fi
91
 		fi
91
 		fi
92
 	fi
92
 	fi
93
 
93
 
94
-	if grep -Fxq "install_search_engine" $COMPLETION_FILE; then
94
+	if grep -Fxq "install_searx" $COMPLETION_FILE; then
95
 		return
95
 		return
96
 	fi
96
 	fi
97
 
97
 
130
 		exit 63738
130
 		exit 63738
131
 	fi
131
 	fi
132
 
132
 
133
-	if [ ! -d $SEARCH_ENGINE_PATH ]; then
134
-		mkdir -p $SEARCH_ENGINE_PATH
133
+	if [ ! -d $SEARX_PATH ]; then
134
+		mkdir -p $SEARX_PATH
135
 	fi
135
 	fi
136
 
136
 
137
 	# clone the repo
137
 	# clone the repo
138
-	cd $SEARCH_ENGINE_PATH
138
+	cd $SEARX_PATH
139
 	function_check git_clone
139
 	function_check git_clone
140
-	git_clone $SEARCH_ENGINE_REPO searx
141
-	git checkout $SEARCH_ENGINE_COMMIT -b $SEARCH_ENGINE_COMMIT
140
+	git_clone $SEARX_REPO searx
141
+	git checkout $SEARX_COMMIT -b $SEARX_COMMIT
142
 	if ! grep -q "Search engine commit" $COMPLETION_FILE; then
142
 	if ! grep -q "Search engine commit" $COMPLETION_FILE; then
143
-		echo "Search engine commit:$SEARCH_ENGINE_COMMIT" >> $COMPLETION_FILE
143
+		echo "Search engine commit:$SEARX_COMMIT" >> $COMPLETION_FILE
144
 	else
144
 	else
145
-		sed -i "s/Search engine commit.*/Search engine commit:$SEARCH_ENGINE_COMMIT/g" $COMPLETION_FILE
145
+		sed -i "s/Search engine commit.*/Search engine commit:$SEARX_COMMIT/g" $COMPLETION_FILE
146
 	fi
146
 	fi
147
 
147
 
148
 	# create an onion service
148
 	# create an onion service
149
-	SEARCH_ENGINE_ONION_HOSTNAME=$(add_onion_service searx 80 ${SEARCH_ENGINE_ONION_PORT})
149
+	SEARX_ONION_HOSTNAME=$(add_onion_service searx 80 ${SEARX_ONION_PORT})
150
 	if ! grep "Search engine onion domain" $COMPLETION_FILE; then
150
 	if ! grep "Search engine onion domain" $COMPLETION_FILE; then
151
-		echo "Search engine onion domain:${SEARCH_ENGINE_ONION_HOSTNAME}" >> $COMPLETION_FILE
151
+		echo "Search engine onion domain:${SEARX_ONION_HOSTNAME}" >> $COMPLETION_FILE
152
 	else
152
 	else
153
-		sed -i "s|Search engine onion domain.*|Search engine onion domain:${SEARCH_ENGINE_ONION_HOSTNAME}|g" $COMPLETION_FILE
153
+		sed -i "s|Search engine onion domain.*|Search engine onion domain:${SEARX_ONION_HOSTNAME}|g" $COMPLETION_FILE
154
 	fi
154
 	fi
155
 
155
 
156
 	# an unprivileged user to run as
156
 	# an unprivileged user to run as
157
-	useradd -d ${SEARCH_ENGINE_PATH}/searx/ -s /bin/false searx
157
+	useradd -d ${SEARX_PATH}/searx/ -s /bin/false searx
158
 	adduser searx debian-tor
158
 	adduser searx debian-tor
159
 
159
 
160
 	# daemon
160
 	# daemon
167
 	echo 'Type=simple' >> /etc/systemd/system/searx.service
167
 	echo 'Type=simple' >> /etc/systemd/system/searx.service
168
 	echo 'User=searx' >> /etc/systemd/system/searx.service
168
 	echo 'User=searx' >> /etc/systemd/system/searx.service
169
 	echo 'Group=searx' >> /etc/systemd/system/searx.service
169
 	echo 'Group=searx' >> /etc/systemd/system/searx.service
170
-	echo "WorkingDirectory=${SEARCH_ENGINE_PATH}/searx" >> /etc/systemd/system/searx.service
171
-	echo "ExecStart=/usr/bin/python ${SEARCH_ENGINE_PATH}/searx/searx/webapp.py" >> /etc/systemd/system/searx.service
170
+	echo "WorkingDirectory=${SEARX_PATH}/searx" >> /etc/systemd/system/searx.service
171
+	echo "ExecStart=/usr/bin/python ${SEARX_PATH}/searx/searx/webapp.py" >> /etc/systemd/system/searx.service
172
 	echo 'Restart=always' >> /etc/systemd/system/searx.service
172
 	echo 'Restart=always' >> /etc/systemd/system/searx.service
173
 	echo 'Environment="USER=searx"' >> /etc/systemd/system/searx.service
173
 	echo 'Environment="USER=searx"' >> /etc/systemd/system/searx.service
174
 	echo '' >> /etc/systemd/system/searx.service
174
 	echo '' >> /etc/systemd/system/searx.service
177
 
177
 
178
 	# create a webserver file
178
 	# create a webserver file
179
 	echo 'server {' > /etc/nginx/sites-available/searx
179
 	echo 'server {' > /etc/nginx/sites-available/searx
180
-	echo "    listen 127.0.0.1:${SEARCH_ENGINE_ONION_PORT} default_server;" >> /etc/nginx/sites-available/searx
181
-	echo "    root ${SEARCH_ENGINE_PATH}/searx;" >> /etc/nginx/sites-available/searx
182
-	echo "    server_name ${SEARCH_ENGINE_ONION_HOSTNAME};" >> /etc/nginx/sites-available/searx
180
+	echo "    listen 127.0.0.1:${SEARX_ONION_PORT} default_server;" >> /etc/nginx/sites-available/searx
181
+	echo "    root ${SEARX_PATH}/searx;" >> /etc/nginx/sites-available/searx
182
+	echo "    server_name ${SEARX_ONION_HOSTNAME};" >> /etc/nginx/sites-available/searx
183
 	echo '    access_log off;' >> /etc/nginx/sites-available/searx
183
 	echo '    access_log off;' >> /etc/nginx/sites-available/searx
184
 	echo "    error_log /var/log/searx_error.log $WEBSERVER_LOG_LEVEL;" >> /etc/nginx/sites-available/searx
184
 	echo "    error_log /var/log/searx_error.log $WEBSERVER_LOG_LEVEL;" >> /etc/nginx/sites-available/searx
185
 	echo '' >> /etc/nginx/sites-available/searx
185
 	echo '' >> /etc/nginx/sites-available/searx
198
 	echo '        proxy_set_header X-Forwarded-Proto $scheme;' >> /etc/nginx/sites-available/searx
198
 	echo '        proxy_set_header X-Forwarded-Proto $scheme;' >> /etc/nginx/sites-available/searx
199
 	echo '        proxy_redirect off;' >> /etc/nginx/sites-available/searx
199
 	echo '        proxy_redirect off;' >> /etc/nginx/sites-available/searx
200
 
200
 
201
-	echo "        auth_basic \"${SEARCH_ENGINE_LOGIN_TEXT}\";" >> /etc/nginx/sites-available/searx
201
+	echo "        auth_basic \"${SEARX_LOGIN_TEXT}\";" >> /etc/nginx/sites-available/searx
202
 	echo '        auth_basic_user_file /etc/nginx/.htpasswd;' >> /etc/nginx/sites-available/searx
202
 	echo '        auth_basic_user_file /etc/nginx/.htpasswd;' >> /etc/nginx/sites-available/searx
203
 	echo '    }' >> /etc/nginx/sites-available/searx
203
 	echo '    }' >> /etc/nginx/sites-available/searx
204
 	echo '' >> /etc/nginx/sites-available/searx
204
 	echo '' >> /etc/nginx/sites-available/searx
216
 
216
 
217
 	# replace the secret key
217
 	# replace the secret key
218
 	if ! grep "Search engine key" $COMPLETION_FILE; then
218
 	if ! grep "Search engine key" $COMPLETION_FILE; then
219
-		SEARCH_ENGINE_SECRET_KEY="$(create_password 30)"
220
-		echo "Search engine key:${SEARCH_ENGINE_SECRET_KEY}" >> $COMPLETION_FILE
219
+		SEARX_SECRET_KEY="$(create_password 30)"
220
+		echo "Search engine key:${SEARX_SECRET_KEY}" >> $COMPLETION_FILE
221
 	else
221
 	else
222
-		SEARCH_ENGINE_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}')
222
+		SEARX_SECRET_KEY=$(cat $COMPLETION_FILE | grep "Search engine key" | awk -F ':' '{print $2}')
223
 	fi
223
 	fi
224
-	sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
225
-	sed -i "s|secret_key.*|secret_key : \"${SEARCH_ENGINE_SECRET_KEY}\"|g" ${SEARCH_ENGINE_PATH}/searx/searx/settings_robot.yml
226
-	sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\/' ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
227
-	sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARCH_ENGINE_ONION_HOSTNAME}\/' ${SEARCH_ENGINE_PATH}/searx/searx/settings_robot.yml
224
+	sed -i "s|secret_key.*|secret_key : \"${SEARX_SECRET_KEY}\"|g" ${SEARX_PATH}/searx/searx/settings.yml
225
+	sed -i "s|secret_key.*|secret_key : \"${SEARX_SECRET_KEY}\"|g" ${SEARX_PATH}/searx/searx/settings_robot.yml
226
+	sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARX_ONION_HOSTNAME}\/' ${SEARX_PATH}/searx/searx/settings.yml
227
+	sed -i '0,/RE/s/base_url.*/base_url : \"http://${SEARX_ONION_HOSTNAME}\/' ${SEARX_PATH}/searx/searx/settings_robot.yml
228
 
228
 
229
 	# note: this might change to a --tor option in a later version
229
 	# note: this might change to a --tor option in a later version
230
-	if ! grep 'socks5://127.0.0.1:9050' ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml; then
231
-		echo 'outgoing: # communication with search engines' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
232
-		echo '    proxies:' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
233
-		echo '        http : socks5://127.0.0.1:9050' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
234
-		echo '        https: socks5://127.0.0.1:9050' >> ${SEARCH_ENGINE_PATH}/searx/searx/settings.yml
230
+	if ! grep 'socks5://127.0.0.1:9050' ${SEARX_PATH}/searx/searx/settings.yml; then
231
+		echo 'outgoing: # communication with search engines' >> ${SEARX_PATH}/searx/searx/settings.yml
232
+		echo '    proxies:' >> ${SEARX_PATH}/searx/searx/settings.yml
233
+		echo '        http : socks5://127.0.0.1:9050' >> ${SEARX_PATH}/searx/searx/settings.yml
234
+		echo '        https: socks5://127.0.0.1:9050' >> ${SEARX_PATH}/searx/searx/settings.yml
235
 	fi
235
 	fi
236
 
236
 
237
-	chown -R searx:searx ${SEARCH_ENGINE_PATH}/searx
237
+	chown -R searx:searx ${SEARX_PATH}/searx
238
 
238
 
239
 	# enable the site
239
 	# enable the site
240
 	nginx_ensite searx
240
 	nginx_ensite searx
249
 	systemctl start searx.service
249
 	systemctl start searx.service
250
 
250
 
251
 	if ! grep -q "Your search engine password is" /home/$MY_USERNAME/README; then
251
 	if ! grep -q "Your search engine password is" /home/$MY_USERNAME/README; then
252
-		if [ ${#SEARCH_ENGINE_PASSWORD} -lt 8 ]; then
252
+		if [ ${#SEARX_PASSWORD} -lt 8 ]; then
253
 			if [ -f $IMAGE_PASSWORD_FILE ]; then
253
 			if [ -f $IMAGE_PASSWORD_FILE ]; then
254
-				SEARCH_ENGINE_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
254
+				SEARX_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
255
 			else
255
 			else
256
-				SEARCH_ENGINE_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
256
+				SEARX_PASSWORD="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
257
 			fi
257
 			fi
258
 		fi
258
 		fi
259
-		echo "$SEARCH_ENGINE_PASSWORD" | htpasswd -i -s -c /etc/nginx/.htpasswd $MY_USERNAME
259
+		echo "$SEARX_PASSWORD" | htpasswd -i -s -c /etc/nginx/.htpasswd $MY_USERNAME
260
 		echo '' >> /home/$MY_USERNAME/README
260
 		echo '' >> /home/$MY_USERNAME/README
261
 		echo '' >> /home/$MY_USERNAME/README
261
 		echo '' >> /home/$MY_USERNAME/README
262
 		echo $'Search Engine' >> /home/$MY_USERNAME/README
262
 		echo $'Search Engine' >> /home/$MY_USERNAME/README
263
 		echo '=============' >> /home/$MY_USERNAME/README
263
 		echo '=============' >> /home/$MY_USERNAME/README
264
-		echo $"Search engine onion domain: ${SEARCH_ENGINE_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
265
-		echo $"Your search engine password is: $SEARCH_ENGINE_PASSWORD" >> /home/$MY_USERNAME/README
264
+		echo $"Search engine onion domain: ${SEARX_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
265
+		echo $"Your search engine password is: $SEARX_PASSWORD" >> /home/$MY_USERNAME/README
266
 		chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
266
 		chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
267
 		chmod 600 /home/$MY_USERNAME/README
267
 		chmod 600 /home/$MY_USERNAME/README
268
 	fi
268
 	fi
269
 
269
 
270
-	echo 'install_search_engine' >> $COMPLETION_FILE
270
+	echo 'install_searx' >> $COMPLETION_FILE
271
 }
271
 }
272
 
272
 
273
 # NOTE: deliberately no exit 0
273
 # NOTE: deliberately no exit 0

+ 12
- 1
src/freedombone-app-tox View File

45
 TOXIC_FILE=/usr/local/bin/toxic
45
 TOXIC_FILE=/usr/local/bin/toxic
46
 
46
 
47
 function backup_tox {
47
 function backup_tox {
48
-    echo ''
48
+	echo ''
49
 }
49
 }
50
 
50
 
51
 function remove_tox_node {
51
 function remove_tox_node {
246
 	echo 'install_tox_client' >> $COMPLETION_FILE
246
 	echo 'install_tox_client' >> $COMPLETION_FILE
247
 }
247
 }
248
 
248
 
249
+function install_tox {
250
+	if ! grep -Fxq "install_tox" $COMPLETION_FILE; then
251
+		return
252
+	fi
253
+	configure_firewall_for_tox
254
+	install_tox_node
255
+	tox_avahi
256
+	install_tox_client
257
+	echo 'install_tox' >> $COMPLETION_FILE
258
+}
259
+
249
 # NOTE: deliberately no exit 0
260
 # NOTE: deliberately no exit 0

src/freedombone-app-intrusion → src/freedombone-app-tripwire View File

28
 # You should have received a copy of the GNU Affero General Public License
28
 # You should have received a copy of the GNU Affero General Public License
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
-function backup_intrusion_detection {
31
+function backup_tripwire {
32
     echo ''
32
     echo ''
33
 }
33
 }
34
 
34
 
35
-function remove_intrusion_detection {
36
-	if ! grep -Fxq "intrusion_detection" $COMPLETION_FILE; then
35
+function remove_tripwire {
36
+	if ! grep -Fxq "tripwire" $COMPLETION_FILE; then
37
 		return
37
 		return
38
 	fi
38
 	fi
39
 	apt-get -y remove --purge tripwire
39
 	apt-get -y remove --purge tripwire
41
 		rm -rf /etc/tripwire
41
 		rm -rf /etc/tripwire
42
 	fi
42
 	fi
43
 	rm /usr/bin/reset-tripwire
43
 	rm /usr/bin/reset-tripwire
44
-	sed -i '/intrusion_detection/d' $COMPLETION_FILE
44
+	sed -i '/tripwire/d' $COMPLETION_FILE
45
 }
45
 }
46
 
46
 
47
-function intrusion_detection {
48
-	if grep -Fxq "intrusion_detection" $COMPLETION_FILE; then
47
+function install_tripwire {
48
+	if grep -Fxq "install_tripwire" $COMPLETION_FILE; then
49
 		return
49
 		return
50
 	fi
50
 	fi
51
 	if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
51
 	if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
98
 
98
 
99
 	   ' | reset-tripwire
99
 	   ' | reset-tripwire
100
 
100
 
101
-	echo 'intrusion_detection' >> $COMPLETION_FILE
101
+	echo 'install_tripwire' >> $COMPLETION_FILE
102
 }
102
 }
103
 
103
 
104
 # NOTE: deliberately no exit 0
104
 # NOTE: deliberately no exit 0

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

28
 # You should have received a copy of the GNU Affero General Public License
28
 # You should have received a copy of the GNU Affero General Public License
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
29
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
30
 
30
 
31
-function backup_vpn_tunnel {
31
+function backup_vpn {
32
     echo ''
32
     echo ''
33
 }
33
 }
34
 
34
 
35
-function remove_vpn_tunnel {
35
+function remove_vpn {
36
 	apt-get -y remove --purge fastd
36
 	apt-get -y remove --purge fastd
37
 }
37
 }
38
 
38
 
39
-function install_vpn_tunnel {
39
+function install_vpn {
40
 	if ! grep -q "repo.universe-factory.net" /etc/apt/sources.list; then
40
 	if ! grep -q "repo.universe-factory.net" /etc/apt/sources.list; then
41
 		echo 'deb http://repo.universe-factory.net/debian/ sid main' >> /etc/apt/sources.list
41
 		echo 'deb http://repo.universe-factory.net/debian/ sid main' >> /etc/apt/sources.list
42
 		gpg --keyserver pgpkeys.mit.edu --recv-key 16EF3F64CB201D9C
42
 		gpg --keyserver pgpkeys.mit.edu --recv-key 16EF3F64CB201D9C

+ 2
- 2
src/freedombone-backup-remote View File

313
 	fi
313
 	fi
314
 }
314
 }
315
 
315
 
316
-function backup_rss_reader {
316
+function backup_rss {
317
 	if grep -q "RSS reader domain" $COMPLETION_FILE; then
317
 	if grep -q "RSS reader domain" $COMPLETION_FILE; then
318
 		RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}')
318
 		RSS_READER_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "RSS reader domain" | awk -F ':' '{print $2}')
319
 		if [ -d /etc/share/tt-rss ]; then
319
 		if [ -d /etc/share/tt-rss ]; then
650
 	backup_letsencrypt
650
 	backup_letsencrypt
651
 	backup_tor
651
 	backup_tor
652
 	backup_gnusocial
652
 	backup_gnusocial
653
-	backup_rss_reader
653
+	backup_rss
654
 	backup_hubzilla
654
 	backup_hubzilla
655
 	backup_syncthing
655
 	backup_syncthing
656
 	backup_mediagoblin
656
 	backup_mediagoblin

+ 2
- 2
src/freedombone-restore-local View File

851
 	fi
851
 	fi
852
 }
852
 }
853
 
853
 
854
-function restore_rss_reader {
854
+function restore_rss {
855
 	if [[ $RESTORE_APP != 'all' ]]; then
855
 	if [[ $RESTORE_APP != 'all' ]]; then
856
 		if [[ $RESTORE_APP != 'ttrss' ]]; then
856
 		if [[ $RESTORE_APP != 'ttrss' ]]; then
857
 			return
857
 			return
1278
 restore_xmpp
1278
 restore_xmpp
1279
 restore_gnu_social
1279
 restore_gnu_social
1280
 restore_hubzilla
1280
 restore_hubzilla
1281
-restore_rss_reader
1281
+restore_rss
1282
 restore_syncthing
1282
 restore_syncthing
1283
 restore_mediagoblin
1283
 restore_mediagoblin
1284
 restore_gogs
1284
 restore_gogs

+ 2
- 2
src/freedombone-restore-remote View File

717
 	fi
717
 	fi
718
 }
718
 }
719
 
719
 
720
-function restore_rss_reader {
720
+function restore_rss {
721
 	if [[ $RESTORE_APP != 'all' ]]; then
721
 	if [[ $RESTORE_APP != 'all' ]]; then
722
 		if [[ $RESTORE_APP != 'ttrss' ]]; then
722
 		if [[ $RESTORE_APP != 'ttrss' ]]; then
723
 			return
723
 			return
1118
 restore_xmpp
1118
 restore_xmpp
1119
 restore_gnu_social
1119
 restore_gnu_social
1120
 restore_hubzilla
1120
 restore_hubzilla
1121
-restore_rss_reader
1121
+restore_rss
1122
 restore_syncthing
1122
 restore_syncthing
1123
 restore_mediagoblin
1123
 restore_mediagoblin
1124
 restore_gogs
1124
 restore_gogs

+ 1
- 1
src/freedombone-utils-database View File

143
 	fi
143
 	fi
144
 }
144
 }
145
 
145
 
146
-function get_mariadb_rss_reader_admin_password {
146
+function get_mariadb_rss_admin_password {
147
 	if [ -f /home/$MY_USERNAME/README ]; then
147
 	if [ -f /home/$MY_USERNAME/README ]; then
148
 		if grep -q "RSS reader admin password" /home/$MY_USERNAME/README; then
148
 		if grep -q "RSS reader admin password" /home/$MY_USERNAME/README; then
149
 			RSS_READER_ADMIN_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "RSS reader admin password" | awk -F ':' '{print $2}' | sed 's/^ *//')
149
 			RSS_READER_ADMIN_PASSWORD=$(cat /home/$MY_USERNAME/README | grep "RSS reader admin password" | awk -F ':' '{print $2}' | sed 's/^ *//')

+ 9
- 9
src/freedombone-utils-setup View File

298
 }
298
 }
299
 
299
 
300
 function setup_email {
300
 function setup_email {
301
-	configure_email
301
+	install_email
302
 	create_procmail
302
 	create_procmail
303
 	handle_admin_emails
303
 	handle_admin_emails
304
 	spam_filtering
304
 	spam_filtering
346
 	install_sip_turn
346
 	install_sip_turn
347
 	install_blog
347
 	install_blog
348
 	mark_blog_domain
348
 	mark_blog_domain
349
-	install_gnu_social
349
+	install_gnusocial
350
 	expire_gnu_social_posts
350
 	expire_gnu_social_posts
351
-	install_gnu_social_theme
352
-	install_gnu_social_markdown
353
-	install_gnu_social_plugin_sharings
354
-	install_gnu_social_plugin_sharings_theme
355
-	install_rss_reader
356
-	install_rss_reader_gnusocial
351
+	install_gnusocial_theme
352
+	install_gnusocial_markdown
353
+	install_gnusocial_plugin_sharings
354
+	install_gnusocial_plugin_sharings_theme
355
+	install_rss
356
+	install_rss_gnusocial
357
 	install_rss_mobile_reader
357
 	install_rss_mobile_reader
358
 	install_hubzilla
358
 	install_hubzilla
359
 	#install_webmail
359
 	#install_webmail
360
 	#install_search_engine
360
 	#install_search_engine
361
-	install_dlna_server
361
+	install_dlna
362
 	#install_mediagoblin
362
 	#install_mediagoblin
363
 	#install_ipfs
363
 	#install_ipfs
364
 	repair_databases_script
364
 	repair_databases_script