Mount message
This commit is contained in:
parent
33dd3848ab
commit
1504a2f252
|
@ -152,6 +152,7 @@ function search_for_attached_usb_drive {
|
||||||
fi
|
fi
|
||||||
if [ -d $USB_DRIVE ]; then
|
if [ -d $USB_DRIVE ]; then
|
||||||
if [ ! -d /media/usb ]; then
|
if [ ! -d /media/usb ]; then
|
||||||
|
echo 'Mounting USB drive'
|
||||||
mount $USB_DRIVE /media/usb
|
mount $USB_DRIVE /media/usb
|
||||||
fi
|
fi
|
||||||
if [ -d /media/usb/Maildir ]; then
|
if [ -d /media/usb/Maildir ]; then
|
||||||
|
@ -271,7 +272,7 @@ function update_the_kernel {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
cd /opt/scripts/tools
|
cd /opt/scripts/tools
|
||||||
./update_kernel.sh --kernel $KERNEL_VERSION
|
./update_kernel.sh --kernel $KERNEL_VERSION
|
||||||
|
@ -283,7 +284,7 @@ function enable_zram {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if ! grep -q "options zram num_devices=1" /etc/modprobe.d/zram.conf; then
|
if ! grep -q "options zram num_devices=1" /etc/modprobe.d/zram.conf; then
|
||||||
echo 'options zram num_devices=1' >> /etc/modprobe.d/zram.conf
|
echo 'options zram num_devices=1' >> /etc/modprobe.d/zram.conf
|
||||||
|
@ -365,9 +366,9 @@ function random_number_generator {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# it is assumed that docker uses the random number
|
# it is assumed that docker uses the random number
|
||||||
# generator of the host system
|
# generator of the host system
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $USE_HWRNG == "yes" ]; then
|
if [ $USE_HWRNG == "yes" ]; then
|
||||||
apt-get -y --force-yes install rng-tools
|
apt-get -y --force-yes install rng-tools
|
||||||
|
@ -557,8 +558,8 @@ function configure_firewall {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# docker does its own firewalling
|
# docker does its own firewalling
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -P INPUT ACCEPT
|
iptables -P INPUT ACCEPT
|
||||||
ip6tables -P INPUT ACCEPT
|
ip6tables -P INPUT ACCEPT
|
||||||
|
@ -587,8 +588,8 @@ function configure_firewall_for_dns {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# docker does its own firewalling
|
# docker does its own firewalling
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -A INPUT -i eth0 -p udp -m udp --dport 1024:65535 --sport 53 -j ACCEPT
|
iptables -A INPUT -i eth0 -p udp -m udp --dport 1024:65535 --sport 53 -j ACCEPT
|
||||||
save_firewall_settings
|
save_firewall_settings
|
||||||
|
@ -600,8 +601,8 @@ function configure_firewall_for_ftp {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# docker does its own firewalling
|
# docker does its own firewalling
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -I INPUT -i eth0 -p tcp --dport 1024:65535 --sport 20:21 -j ACCEPT
|
iptables -I INPUT -i eth0 -p tcp --dport 1024:65535 --sport 20:21 -j ACCEPT
|
||||||
save_firewall_settings
|
save_firewall_settings
|
||||||
|
@ -613,8 +614,8 @@ function configure_firewall_for_web {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# docker does its own firewalling
|
# docker does its own firewalling
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -A INPUT -i eth0 -p tcp --dport 32768:61000 --sport 80 -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --dport 32768:61000 --sport 80 -j ACCEPT
|
||||||
iptables -A INPUT -i eth0 -p tcp --dport 32768:61000 --sport 443 -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --dport 32768:61000 --sport 443 -j ACCEPT
|
||||||
|
@ -627,8 +628,8 @@ function configure_firewall_for_ssh {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# docker does its own firewalling
|
# docker does its own firewalling
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A INPUT -i eth0 -p tcp --dport $SSH_PORT -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --dport $SSH_PORT -j ACCEPT
|
||||||
|
@ -641,8 +642,8 @@ function configure_firewall_for_git {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# docker does its own firewalling
|
# docker does its own firewalling
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -A INPUT -i eth0 -p tcp --dport 9418 -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --dport 9418 -j ACCEPT
|
||||||
save_firewall_settings
|
save_firewall_settings
|
||||||
|
@ -654,8 +655,8 @@ function configure_firewall_for_email {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
|
||||||
# docker does its own firewalling
|
# docker does its own firewalling
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
|
||||||
iptables -A INPUT -i eth0 -p tcp --dport 587 -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --dport 587 -j ACCEPT
|
||||||
|
|
Loading…
Reference in New Issue