|
|
@ -107,13 +107,13 @@ else |
|
|
|
echo no french variant found, ok! |
|
|
|
fi |
|
|
|
|
|
|
|
echo "## debian-bash" |
|
|
|
echo "## miaou-bash" |
|
|
|
echo "==============" |
|
|
|
if [[ ! -d /opt/debian-bash ]]; then |
|
|
|
curl https://git.artcode.re/pvincent/debian-bash/raw/branch/master/install.sh | sudo bash -s -- --host |
|
|
|
if [[ ! -d /opt/miaou-bash ]]; then |
|
|
|
curl https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh | sudo bash -s |
|
|
|
else |
|
|
|
echo "debian-bash already installed!" |
|
|
|
/opt/debian-bash/tools/debian_bash_upgrade |
|
|
|
echo "miaou-bash already installed!" |
|
|
|
/opt/miaou-bash/tools/upgrade-miaou-bash |
|
|
|
fi |
|
|
|
|
|
|
|
echo "## openssh-server" |
|
|
@ -123,9 +123,9 @@ runVoid dpkg-query --status $PGKNAME |
|
|
|
if [ $runVoidError -ne 0 ]; then |
|
|
|
set -e |
|
|
|
sudo apt install -y $PGKNAME |
|
|
|
sudo /opt/debian-bash/tools/append_or_replace "^#\?PermitRootLogin.*$" "PermitRootLogin no" /etc/ssh/sshd_config |
|
|
|
sudo /opt/debian-bash/tools/append_or_replace "^#\?PasswordAuthentication.*$" "PasswordAuthentication no" /etc/ssh/sshd_config |
|
|
|
sudo /opt/debian-bash/tools/append_or_replace "^#\?AllowUsers.*$" "AllowUsers $ALLOWED_USERS" /etc/ssh/sshd_config |
|
|
|
sudo /opt/miaou-bash/tools/append_or_replace "^#\?PermitRootLogin.*$" "PermitRootLogin no" /etc/ssh/sshd_config |
|
|
|
sudo /opt/miaou-bash/tools/append_or_replace "^#\?PasswordAuthentication.*$" "PasswordAuthentication no" /etc/ssh/sshd_config |
|
|
|
sudo /opt/miaou-bash/tools/append_or_replace "^#\?AllowUsers.*$" "AllowUsers $ALLOWED_USERS" /etc/ssh/sshd_config |
|
|
|
sudo systemctl restart sshd |
|
|
|
set +e |
|
|
|
else |
|
|
@ -136,8 +136,7 @@ echo "## grub faster and smarter" |
|
|
|
echo "==========================" |
|
|
|
if grep -q GRUB_TIMEOUT=5 /etc/default/grub; then |
|
|
|
echo "grub was not modified yet, applying changes..." |
|
|
|
sudo /opt/debian-bash/tools/append_or_replace "^GRUB_TIMEOUT=5$" "GRUB_TIMEOUT=0" /etc/default/grub |
|
|
|
# sudo /opt/debian-bash/tools/append_or_replace "^GRUB_CMDLINE_LINUX_DEFAULT=.*$" "GRUB_CMDLINE_LINUX_DEFAULT=\"quiet nosgx\"" /etc/default/grub |
|
|
|
sudo /opt/miaou-bash/tools/append_or_replace "^GRUB_TIMEOUT=5$" "GRUB_TIMEOUT=0" /etc/default/grub |
|
|
|
sudo update-grub |
|
|
|
echo OK |
|
|
|
else |
|
|
|