From 3276863650b769874431c127865d2cbb46d08a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20P=C3=A0mies?= Date: Sun, 22 Jan 2023 23:58:40 +0100 Subject: [PATCH] add init scripts --- init_scripts.sh | 30 ++++++++++++++++++++++ updates-notifier.sh => updates_notifier.sh | 0 2 files changed, 30 insertions(+) create mode 100644 init_scripts.sh rename updates-notifier.sh => updates_notifier.sh (100%) mode change 100755 => 100644 diff --git a/init_scripts.sh b/init_scripts.sh new file mode 100644 index 0000000..987690e --- /dev/null +++ b/init_scripts.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +#verify run as root or sudo +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" + exit 1 +fi + +echo "/////////////////////////////////////" +echo "Benvingut a l'instalador d'Scripts" +echo "/////////////////////////////////////" + +# Choose script to install +echo "0) Sortir de l'instalador" +echo "1) Notificador d'actualitzacions" +echo "2) Escaneig de rootkits amb RK Hunter" +echo "3) Escaneig de rootkits amb CHK Rootkit" +echo "4) Escaneig de virus amb ClamAV" + +finished=false +while [ "$finished" != "true" ] +do + read -p 'Indica quin script vols instal·lar: ' SCRIPT_NUM + case $SCRIPT_NUM in + ("") echo "El número no pot ser buit";; + (*[!0-9]*) echo "Has d'introduir un número";; + (*[5-9]*) echo "Aquest número d'script no existeix";; + (*) finished=true #echo "just numeric";; + esac +done diff --git a/updates-notifier.sh b/updates_notifier.sh old mode 100755 new mode 100644 similarity index 100% rename from updates-notifier.sh rename to updates_notifier.sh