Browse Source

miaou-bash

master
pvincent 9 months ago
parent
commit
d6a505f33f
  1. 2
      src/install.sh
  2. 19
      src/main

2
src/install.sh

@ -6,8 +6,6 @@ echo ----------------------
[ "$(id -u)" -eq 0 ] && echo 'normal user required: ie, not <root>!' && exit 1 [ "$(id -u)" -eq 0 ] && echo 'normal user required: ie, not <root>!' && exit 1
if [[ ! $PWD == '/opt/debian-gnome' ]]; then if [[ ! $PWD == '/opt/debian-gnome' ]]; then
# download and fullfill /opt/debian-bash, then run it from folder
if [[ ! -L /opt/debian-gnome ]]; then if [[ ! -L /opt/debian-gnome ]]; then
sudo rm -rf /opt/debian-gnome sudo rm -rf /opt/debian-gnome
sudo git clone --depth=1 https://git.artcode.re/pvincent/debian-gnome /opt/debian-gnome sudo git clone --depth=1 https://git.artcode.re/pvincent/debian-gnome /opt/debian-gnome

19
src/main

@ -107,13 +107,13 @@ else
echo no french variant found, ok! echo no french variant found, ok!
fi fi
echo "## debian-bash"
echo "## miaou-bash"
echo "==============" 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 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 fi
echo "## openssh-server" echo "## openssh-server"
@ -123,9 +123,9 @@ runVoid dpkg-query --status $PGKNAME
if [ $runVoidError -ne 0 ]; then if [ $runVoidError -ne 0 ]; then
set -e set -e
sudo apt install -y $PGKNAME 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 sudo systemctl restart sshd
set +e set +e
else else
@ -136,8 +136,7 @@ echo "## grub faster and smarter"
echo "==========================" echo "=========================="
if grep -q GRUB_TIMEOUT=5 /etc/default/grub; then if grep -q GRUB_TIMEOUT=5 /etc/default/grub; then
echo "grub was not modified yet, applying changes..." 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 sudo update-grub
echo OK echo OK
else else

Loading…
Cancel
Save