|
@@ -31,7 +31,7 @@ function argument_checks {
|
31
|
31
|
}
|
32
|
32
|
|
33
|
33
|
function remove_proprietary_repos {
|
34
|
|
- if [ grep -Fxq "remove_proprietary_repos" $COMPLETION_FILE ]; then
|
|
34
|
+ if grep -Fxq "remove_proprietary_repos" $COMPLETION_FILE; then
|
35
|
35
|
return
|
36
|
36
|
fi
|
37
|
37
|
sed -i 's/ non-free//g' /etc/apt/sources.list
|
|
@@ -39,7 +39,7 @@ function remove_proprietary_repos {
|
39
|
39
|
}
|
40
|
40
|
|
41
|
41
|
function initial_setup {
|
42
|
|
- if [ grep -Fxq "initial_setup" $COMPLETION_FILE ]; then
|
|
42
|
+ if grep -Fxq "initial_setup" $COMPLETION_FILE; then
|
43
|
43
|
return
|
44
|
44
|
fi
|
45
|
45
|
apt-get -y update
|
|
@@ -49,7 +49,7 @@ function initial_setup {
|
49
|
49
|
}
|
50
|
50
|
|
51
|
51
|
function install_editor {
|
52
|
|
- if [ grep -Fxq "install_editor" $COMPLETION_FILE ]; then
|
|
52
|
+ if grep -Fxq "install_editor" $COMPLETION_FILE; then
|
53
|
53
|
return
|
54
|
54
|
fi
|
55
|
55
|
update-alternatives --set editor /usr/bin/emacs24
|
|
@@ -57,7 +57,7 @@ function install_editor {
|
57
|
57
|
}
|
58
|
58
|
|
59
|
59
|
function enable_backports {
|
60
|
|
- if [ grep -Fxq "enable_backports" $COMPLETION_FILE ]; then
|
|
60
|
+ if grep -Fxq "enable_backports" $COMPLETION_FILE; then
|
61
|
61
|
return
|
62
|
62
|
fi
|
63
|
63
|
echo "deb http://ftp.us.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
|
|
@@ -65,7 +65,7 @@ function enable_backports {
|
65
|
65
|
}
|
66
|
66
|
|
67
|
67
|
function update_the_kernel {
|
68
|
|
- if [ grep -Fxq "update_the_kernel" $COMPLETION_FILE ]; then
|
|
68
|
+ if grep -Fxq "update_the_kernel" $COMPLETION_FILE; then
|
69
|
69
|
return
|
70
|
70
|
fi
|
71
|
71
|
cd /opt/scripts/tools
|
|
@@ -74,7 +74,7 @@ function update_the_kernel {
|
74
|
74
|
}
|
75
|
75
|
|
76
|
76
|
function enable_zram {
|
77
|
|
- if [ grep -Fxq "enable_zram" $COMPLETION_FILE ]; then
|
|
77
|
+ if grep -Fxq "enable_zram" $COMPLETION_FILE; then
|
78
|
78
|
return
|
79
|
79
|
fi
|
80
|
80
|
echo "options zram num_devices=1" >> /etc/modprobe.d/zram.conf
|
|
@@ -151,7 +151,7 @@ function enable_zram {
|
151
|
151
|
}
|
152
|
152
|
|
153
|
153
|
function random_number_generator {
|
154
|
|
- if [ grep -Fxq "random_number_generator" $COMPLETION_FILE ]; then
|
|
154
|
+ if grep -Fxq "random_number_generator" $COMPLETION_FILE; then
|
155
|
155
|
return
|
156
|
156
|
fi
|
157
|
157
|
if [ $USE_HWRNG == "yes" ]; then
|
|
@@ -166,7 +166,7 @@ function random_number_generator {
|
166
|
166
|
}
|
167
|
167
|
|
168
|
168
|
function configure_ssh {
|
169
|
|
- if [ grep -Fxq "configure_ssh" $COMPLETION_FILE ]; then
|
|
169
|
+ if grep -Fxq "configure_ssh" $COMPLETION_FILE; then
|
170
|
170
|
return
|
171
|
171
|
fi
|
172
|
172
|
sed -i "s/Port 22/Port $SSH_PORT/g" /etc/ssh/sshd_config
|
|
@@ -187,7 +187,7 @@ function configure_ssh {
|
187
|
187
|
}
|
188
|
188
|
|
189
|
189
|
function regenerate_ssh_keys {
|
190
|
|
- if [ grep -Fxq "regenerate_ssh_keys" $COMPLETION_FILE ]; then
|
|
190
|
+ if grep -Fxq "regenerate_ssh_keys" $COMPLETION_FILE; then
|
191
|
191
|
return
|
192
|
192
|
fi
|
193
|
193
|
rm -f /etc/ssh/ssh_host_*
|
|
@@ -197,7 +197,7 @@ function regenerate_ssh_keys {
|
197
|
197
|
}
|
198
|
198
|
|
199
|
199
|
function set_your_domain_name {
|
200
|
|
- if [ grep -Fxq "set_your_domain_name" $COMPLETION_FILE ]; then
|
|
200
|
+ if grep -Fxq "set_your_domain_name" $COMPLETION_FILE; then
|
201
|
201
|
return
|
202
|
202
|
fi
|
203
|
203
|
echo "$DOMAIN_NAME" > /etc/hostname
|
|
@@ -207,7 +207,7 @@ function set_your_domain_name {
|
207
|
207
|
}
|
208
|
208
|
|
209
|
209
|
function time_synchronisation {
|
210
|
|
- if [ grep -Fxq "time_synchronisation" $COMPLETION_FILE ]; then
|
|
210
|
+ if grep -Fxq "time_synchronisation" $COMPLETION_FILE; then
|
211
|
211
|
return
|
212
|
212
|
fi
|
213
|
213
|
apt-get -y install build-essential automake git pkg-config autoconf libtool libssl-dev
|
|
@@ -330,7 +330,7 @@ function time_synchronisation {
|
330
|
330
|
}
|
331
|
331
|
|
332
|
332
|
function configure_firewall {
|
333
|
|
- if [ grep -Fxq "configure_firewall" $COMPLETION_FILE ]; then
|
|
333
|
+ if grep -Fxq "configure_firewall" $COMPLETION_FILE; then
|
334
|
334
|
return
|
335
|
335
|
fi
|
336
|
336
|
iptables -P INPUT ACCEPT
|
|
@@ -354,7 +354,7 @@ function save_firewall_settings {
|
354
|
354
|
}
|
355
|
355
|
|
356
|
356
|
function configure_firewall_for_ssh {
|
357
|
|
- if [ grep -Fxq "configure_firewall_for_ssh" $COMPLETION_FILE ]; then
|
|
357
|
+ if grep -Fxq "configure_firewall_for_ssh" $COMPLETION_FILE; then
|
358
|
358
|
return
|
359
|
359
|
fi
|
360
|
360
|
iptables -A INPUT -i eth0 -p tcp --dport $SSH_PORT -j ACCEPT
|
|
@@ -363,7 +363,7 @@ function configure_firewall_for_ssh {
|
363
|
363
|
}
|
364
|
364
|
|
365
|
365
|
function configure_firewall_for_email {
|
366
|
|
- if [ grep -Fxq "configure_firewall_for_email" $COMPLETION_FILE ]; then
|
|
366
|
+ if grep -Fxq "configure_firewall_for_email" $COMPLETION_FILE; then
|
367
|
367
|
return
|
368
|
368
|
fi
|
369
|
369
|
iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
|
|
@@ -375,7 +375,7 @@ function configure_firewall_for_email {
|
375
|
375
|
}
|
376
|
376
|
|
377
|
377
|
function configure_internet_protocol {
|
378
|
|
- if [ grep -Fxq "configure_internet_protocol" $COMPLETION_FILE ]; then
|
|
378
|
+ if grep -Fxq "configure_internet_protocol" $COMPLETION_FILE; then
|
379
|
379
|
return
|
380
|
380
|
fi
|
381
|
381
|
sed -i "s/#net.ipv4.tcp_syncookies=1/net.ipv4.tcp_syncookies=1/g" /etc/sysctl.conf
|
|
@@ -403,7 +403,7 @@ function configure_internet_protocol {
|
403
|
403
|
}
|
404
|
404
|
|
405
|
405
|
function script_to_make_self_signed_certificates {
|
406
|
|
- if [ grep -Fxq "script_to_make_self_signed_certificates" $COMPLETION_FILE ]; then
|
|
406
|
+ if grep -Fxq "script_to_make_self_signed_certificates" $COMPLETION_FILE; then
|
407
|
407
|
return
|
408
|
408
|
fi
|
409
|
409
|
echo '#!/bin/bash' > /usr/bin/makecert
|
|
@@ -437,7 +437,7 @@ function script_to_make_self_signed_certificates {
|
437
|
437
|
}
|
438
|
438
|
|
439
|
439
|
function configure_email {
|
440
|
|
- if [ grep -Fxq "configure_email" $COMPLETION_FILE ]; then
|
|
440
|
+ if grep -Fxq "configure_email" $COMPLETION_FILE; then
|
441
|
441
|
return
|
442
|
442
|
fi
|
443
|
443
|
apt-get -y remove postfix
|
|
@@ -516,7 +516,7 @@ function configure_email {
|
516
|
516
|
}
|
517
|
517
|
|
518
|
518
|
function spam_filtering {
|
519
|
|
- if [ grep -Fxq "spam_filtering" $COMPLETION_FILE ]; then
|
|
519
|
+ if grep -Fxq "spam_filtering" $COMPLETION_FILE; then
|
520
|
520
|
return
|
521
|
521
|
fi
|
522
|
522
|
apt-get -y install spamassassin exim4-daemon-heavy
|
|
@@ -606,7 +606,7 @@ function spam_filtering {
|
606
|
606
|
}
|
607
|
607
|
|
608
|
608
|
function configure_imap {
|
609
|
|
- if [ grep -Fxq "configure_imap" $COMPLETION_FILE ]; then
|
|
609
|
+ if grep -Fxq "configure_imap" $COMPLETION_FILE; then
|
610
|
610
|
return
|
611
|
611
|
fi
|
612
|
612
|
apt-get -y install dovecot-common dovecot-imapd
|
|
@@ -631,7 +631,7 @@ function configure_imap {
|
631
|
631
|
}
|
632
|
632
|
|
633
|
633
|
function configure_gpg {
|
634
|
|
- if [ grep -Fxq "configure_gpg" $COMPLETION_FILE ]; then
|
|
634
|
+ if grep -Fxq "configure_gpg" $COMPLETION_FILE; then
|
635
|
635
|
return
|
636
|
636
|
fi
|
637
|
637
|
apt-get -y install gnupg
|
|
@@ -639,7 +639,7 @@ function configure_gpg {
|
639
|
639
|
}
|
640
|
640
|
|
641
|
641
|
function email_client {
|
642
|
|
- if [ grep -Fxq "email_client" $COMPLETION_FILE ]; then
|
|
642
|
+ if grep -Fxq "email_client" $COMPLETION_FILE; then
|
643
|
643
|
return
|
644
|
644
|
fi
|
645
|
645
|
apt-get -y install mutt-patched lynx abook
|
|
@@ -740,7 +740,7 @@ function email_client {
|
740
|
740
|
}
|
741
|
741
|
|
742
|
742
|
function folders_for_mailing_lists {
|
743
|
|
- if [ grep -Fxq "folders_for_mailing_lists" $COMPLETION_FILE ]; then
|
|
743
|
+ if grep -Fxq "folders_for_mailing_lists" $COMPLETION_FILE; then
|
744
|
744
|
return
|
745
|
745
|
fi
|
746
|
746
|
echo '#!/bin/bash' > /usr/bin/mailinglistrule
|
|
@@ -776,7 +776,7 @@ function folders_for_mailing_lists {
|
776
|
776
|
}
|
777
|
777
|
|
778
|
778
|
function folders_for_email_addresses {
|
779
|
|
- if [ grep -Fxq "folders_for_email_addresses" $COMPLETION_FILE ]; then
|
|
779
|
+ if grep -Fxq "folders_for_email_addresses" $COMPLETION_FILE; then
|
780
|
780
|
return
|
781
|
781
|
fi
|
782
|
782
|
echo '#!/bin/bash' > /usr/bin/emailrule
|