diff --git a/README.md b/README.md index 1631473..aa68607 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ utilisé lors des Instalalis dispensés par Libre.re ## install -`curl -s https://git.artcode.re/pvincent/debian-gnome/raw/master/src/main.bash | bash -s --` \ No newline at end of file +`curl -s https://git.artcode.re/pvincent/debian-gnome/raw/master/src/launch | bash -s --` \ No newline at end of file diff --git a/src/main.bash b/src/main.bash deleted file mode 100755 index bdd45c0..0000000 --- a/src/main.bash +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash - -## FUNCTIONS - -function runVoid(){ - local COMMAND="$@" - bash -c "${COMMAND}" >/dev/null 2>&1 - return $? -} - -function askConfirmation (){ - case "$1" in - y|Y|yes|YES ) - QUESTION="(Y/n)?" - DEFAULT=0 - ;; - * ) - QUESTION="(y/N)?" - DEFAULT=1 - ;; - esac - read -p "$QUESTION : " choice - case "$choice" in - y|Y|yes|YES ) return 0;; #true - n|no|N|NO ) return 1;; #false - * ) return $DEFAULT;; - esac -} - -## MAIN - -[ `id -u` -eq 0 ] && echo 'normal user required' && exit -1 - -ALLOWED_USERS=$(id -un) #CUSTOMIZE if needed! -GIT_REPOSITORY_RAW="https://git.artcode.re/pvincent/debian-gnome/raw/master" - -## openssh-server -PGKNAME='openssh-server' -runVoid dpkg-query --status $PGKNAME -if [ $? -ne 0 ] ; then - set -e - sudo apt install $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 systemctl restart sshd - set +e -else - echo "${PGKNAME} already installed!" -fi - -## firefox latest -if [[ ! /usr/local/bin/firefox -ef /opt/firefox/firefox ]];then - set -e - cd /tmp - wget `curl 'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US' | cut -d '"' -f2` -O firefox-latest.tar.bz2 - sudo mkdir /opt/firefox -p - sudo chown $USER /opt/firefox - tar -xjf firefox-latest.tar.bz2 -C /opt - cat <