diff --git a/bin/autoupdate.sh b/bin/autoupdate.sh index d623fbf..a47f160 100755 --- a/bin/autoupdate.sh +++ b/bin/autoupdate.sh @@ -17,7 +17,7 @@ if [ "$EUID" -ne 0 ]; then fi echo -e "\033[35;1mInstalling apticron \033[0m" -apt-get --yesinstall apticron +apt-get --yes install apticron sleep 3 echo -n "Enter an email: " diff --git a/bin/email.sh b/bin/email.sh index 3c1e7ab..c06fd7d 100755 --- a/bin/email.sh +++ b/bin/email.sh @@ -28,7 +28,7 @@ fi # http://www.sycha.com/lamp-setup-debian-linux-apache-mysql-php#anchor13 sleep 2 -apt-get --yesinstall exim4 +apt-get --yes install exim4 echo -e "\033[35;1mConfiguring EXIM4 \033[0m" while [ "$configexim" != "y" ] && [ "$configexim" != "n" ] do diff --git a/bin/fail2ban.sh b/bin/fail2ban.sh index 48cc911..8bc0cb8 100755 --- a/bin/fail2ban.sh +++ b/bin/fail2ban.sh @@ -17,7 +17,7 @@ if [ "$EUID" -ne 0 ]; then fi sleep 2 -apt-get --yesinstall fail2ban +apt-get --yes install fail2ban cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local # ToDo ask for email and configure jail.local with it touch /var/log/auth.log diff --git a/bin/firewall.sh b/bin/firewall.sh index 582c16f..2440c27 100755 --- a/bin/firewall.sh +++ b/bin/firewall.sh @@ -17,7 +17,7 @@ if [ "$EUID" -ne 0 ]; then fi sleep 2 -apt-get --yesinstall ufw +apt-get --yes install ufw # ufw allow ssh # knockd will open the ssh port ufw allow http ufw allow https diff --git a/bin/ftp.sh b/bin/ftp.sh index b16d03f..5ab7a88 100755 --- a/bin/ftp.sh +++ b/bin/ftp.sh @@ -28,7 +28,7 @@ if [ ! -d "$_assets" ]; then fi echo "installing proftpd" -apt-get --yesinstall proftpd +apt-get --yes install proftpd while [ "$_server_name" = "" ] do read -p "enter a server name ? " _server_name diff --git a/bin/knockd.sh b/bin/knockd.sh index 78d28c2..a462db4 100755 --- a/bin/knockd.sh +++ b/bin/knockd.sh @@ -29,7 +29,7 @@ if [ ! -d "$_assets" ]; then fi sleep 2 -apt-get --yesinstall knockd +apt-get --yes install knockd mv /etc/knockd.conf /etc/knockd.conf.ori cp "$_assets"/knockd.conf /etc/knockd.conf diff --git a/bin/lemp.sh b/bin/lemp.sh index 81f8751..2232ece 100755 --- a/bin/lemp.sh +++ b/bin/lemp.sh @@ -39,7 +39,7 @@ echo -e '\033[35m \033[0m' echo -e "\033[35;1minstalling Mysql \033[0m" sleep 3 -apt-get --yesinstall mariadb-server +apt-get --yes install mariadb-server mysql_secure_installation cp "$_assets"/mysql/innodb-file-per-table.cnf /etc/mysql/conf.d/ @@ -57,7 +57,7 @@ echo -e '\033[35m \033[0m' echo -e "\033[35;1mInstalling PHP 7.0 \033[0m" sleep 3 -apt-get --yesinstall php7.0-fpm php7.0-mysql php7.0-opcache php7.0-curl php7.0-mbstring php7.0-zip php7.0-xml php7.0-gd php7.0-mcrypt php-memcached php7.0-imagick +apt-get --yes install php7.0-fpm php7.0-mysql php7.0-opcache php7.0-curl php7.0-mbstring php7.0-zip php7.0-xml php7.0-gd php7.0-mcrypt php-memcached php7.0-imagick mv /etc/php/7.0/fpm/php.ini /etc/php/7.0/fpm/php.ini.back cp "$_assets"/php-fpm.ini /etc/php/7.0/fpm/php.ini @@ -73,7 +73,7 @@ systemctl start php7.0-fpm # echo "Installing memecached" # replaced by redis -# apt-get --yesinstall memcached +# apt-get --yes install memcached # sed -i "s/-m\s64/-m 128/g" /etc/memcached.conf # # systemctl start memcached @@ -90,7 +90,7 @@ echo -e '\033[35m \033[0m' echo -e "\033[35;1mInstalling Nginx \033[0m" sleep 3 -apt-get --yesinstall nginx +apt-get --yes install nginx mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.ori cp "$_assets"/default.nginxconf /etc/nginx/sites-available/default @@ -107,7 +107,7 @@ echo -e '\033[35m /_/ /_/ /____/ \033[0m' echo -e "\033[35;1mInstalling phpMyAdmin \033[0m" -apt-get --yesinstall phpmyadmin +apt-get --yes install phpmyadmin ln -s /usr/share/phpmyadmin /var/www/html/ cp "$_assets"/nginx-phpmyadmin.conf > /etc/nginx/sites-available/phpmyadmin.conf ln -s /etc/nginx/sites-available/phpmyadmin.conf /etc/nginx/sites-enabled/phpmyadmin.conf @@ -131,7 +131,7 @@ echo -e '\033[35m \033[0m' echo -e "\033[35;1mInstalling Redis \033[0m" sleep 3 -apt-get --yesinstall redis-server php-redis +apt-get --yes install redis-server php-redis # TODO set maxmemory=2gb # TODO set maxmemory-policy=volatile-lru @@ -186,7 +186,7 @@ echo -e "\033[92;1mDrush and DrupalConsoleinstalled\033[Om" # echo -e "\033[35;1mInstalling Munin \033[0m" # sleep 3 # # https://www.howtoforge.com/tutorial/server-monitoring-with-munin-and-monit-on-debian/ -# apt-get --yesinstall munin munin-node munin-plugins-extra +# apt-get --yes install munin munin-node munin-plugins-extra # # Configure Munin # # enable plugins # ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_ @@ -225,7 +225,7 @@ echo -e "\033[92;1mDrush and DrupalConsoleinstalled\033[Om" # echo -e "\033[35;1mInstalling Monit \033[0m" # sleep 3 # # https://www.howtoforge.com/tutorial/server-monitoring-with-munin-and-monit-on-debian/2/ -# apt-get --yesinstall monit +# apt-get --yes install monit # # TODO setup monit rc # cat "$_assets"/monitrc > /etc/monit/monitrc # @@ -265,7 +265,7 @@ echo -e "\033[92;1mDrush and DrupalConsoleinstalled\033[Om" # \033[0m' # echo -e "\033[35;1mInstalling Awstat \033[0m" # sleep 3 -# apt-get --yesinstall awstats +# apt-get --yes install awstats # # Configure AWStats # temp=`grep -i sitedomain /etc/awstats/awstats.conf.local | wc -l` # if [ $temp -lt 1 ]; then diff --git a/bin/misc.sh b/bin/misc.sh index 36ce4f8..843b7f3 100755 --- a/bin/misc.sh +++ b/bin/misc.sh @@ -16,12 +16,12 @@ fi sleep 2 # TODO --force-yes is deprecated, use one of the options starting with --allow instead. -apt-get --yesinstall vim curl +apt-get --yes install vim curl sed -i "s/^# en_GB.UTF-8/en_GB.UTF-8/g" /etc/locale.gen locale-gen -apt-get --yesinstall ntp +apt-get --yes install ntp dpkg-reconfigure tzdata -apt-get --yesinstall tmux etckeeper needrestart htop lynx unzip +apt-get --yes install tmux etckeeper needrestart htop lynx unzip # TODO cron # https://askubuntu.com/questions/56683/where-is-the-cron-crontab-log/121560#121560 diff --git a/bin/vhost.sh b/bin/vhost.sh index 39952e7..cb71a2d 100755 --- a/bin/vhost.sh +++ b/bin/vhost.sh @@ -61,7 +61,7 @@ if [ "$vh" = "y" ]; then # lets'encrypt # https://certbot.eff.org/lets-encrypt/debianstretch-nginx if [ "$_letsencrypt" = "yes" ]; then - apt-get --yesinstall certbot + apt-get --yes install certbot certbot certonly --standalone -d "$_domain" --cert-name "$_domain" # TODO stop the whole process if letsencrypt faile mkdir -p /etc/nginx/ssl/certs/"$_domain"