diff --git a/HowToUse.html b/HowToUse.html new file mode 100755 index 0000000..647befa --- /dev/null +++ b/HowToUse.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..f1fb5cb --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2023 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/alp/alp-kde b/alp/alp-kde new file mode 100644 index 0000000..23ab001 --- /dev/null +++ b/alp/alp-kde @@ -0,0 +1,99 @@ +#!/bin/sh + +# non-interactive kde installer for alpine + +# apk add curl && curl -L https://cutt.ly/alpine_kde | sh + +echo "I will make Alpine Linux a Desktop Linux.. ." + +## Desktop user + +apk add sudo +export USER='user' +adduser -D $USER && echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER && chmod 0440 /etc/sudoers.d/$USER +echo "➜ Desktop user created" + +## + +echo "‣ Add login manager" +## Set here your preferred X driver +apk add xf86-video-modesetting +setup-xorg-base + +echo "‣ Add main and community repositories" +cat > /etc/apk/repositories << EOF; $(echo) +http://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/main +http://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community +EOF + +apk update + +echo "★ Add Desktop Environment" +apk add plasma-desktop kde-applications-network kde-applications-base +apk add polkit consolekit2 breeze breeze-icons systemsettings + +# Add NetworkManager +apk add plasma-nm +rc-service networkmanager start +rc-update add networkmanager + + +# Add fuse +apk add fuse-openrc gvfs-fuse gvfs-smb +rc-service fuse start +rc-update add fuse + +# NOTE: `sddm` do not work +apk add lightdm lightdm-gtk-greeter dbus-x11 +# rc-service lightdm start +rc-update add lightdm + +apk add alsa-utils alsa-lib alsaconf +addgroup $USER audio +addgroup root audio + + + +apk add pulseaudio pulseaudio-alsa alsa-plugins-pulse + +rc-service alsa start +rc-update add alsa + + +echo "★ Add software" +# apk add firefox-esr +#apk add chromium +apk add htop neofetch + +echo "★★★ Congrats! ★★★ run: passwd user, to set your user password and then run: reboot" + + + + + + + + + + + + + + +## Some more stuff you could need + +# rc-service wpa_supplicant start +# /etc/init.d/networking restart +# sudo rc-update add wpa_supplicant boot +# sudo apk add acpi +# sudo apk add cpufreqd +# sudo rc-update add cpufreqd +# sudo apk add xbacklight xrand + +## FIXME + +#- brightness keys not working +#- networkmanager +#- pulseaudio +# no shutdown from GUI +#- no auth mount usbke \ No newline at end of file diff --git a/alp/autoupd-daily b/alp/autoupd-daily new file mode 100755 index 0000000..7dea2c0 --- /dev/null +++ b/alp/autoupd-daily @@ -0,0 +1,5 @@ +#!/bin/sh +apk upgrade --update | sed "s/^/[`date`] /" >> /var/log/apk-autoupgrade.log + +# Setup : +# wget http://s.tyleodev.fr/setup/alp/autoupd-daily -O /etc/periodic/daily/apk-autoupgrade && chmod 700 /etc/periodic/daily/apk-autoupgrade diff --git a/cubic/custom-servernode-deb b/cubic/custom-servernode-deb new file mode 100755 index 0000000..d0b1fe8 --- /dev/null +++ b/cubic/custom-servernode-deb @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +clear +sudo apt-get update +sudo apt-get purge plymouth -y +sudo apt-get remove libx11.* libqt.* libgtk.* -y \ No newline at end of file diff --git a/devel/irp-fedora b/devel/irp-fedora new file mode 100755 index 0000000..4653267 --- /dev/null +++ b/devel/irp-fedora @@ -0,0 +1,282 @@ +#!/usr/bin/env bash +clear + + +## FEDORA BASEOS FILES +osrel="/etc/fedora-release" +###################### + +## COLORS +# Reset +Color_Off='\033[0m' # Text Reset + +# Regular Colors +Black='\033[0;30m' # Black +Red='\033[0;31m' # Red +Green='\033[0;32m' # Green +Yellow='\033[0;33m' # Yellow +Blue='\033[0;34m' # Blue +Purple='\033[0;35m' # Purple +Cyan='\033[0;36m' # Cyan +White='\033[0;37m' # White + +# Bold +BBlack='\033[1;30m' # Black +BRed='\033[1;31m' # Red +BGreen='\033[1;32m' # Green +BYellow='\033[1;33m' # Yellow +BBlue='\033[1;34m' # Blue +BPurple='\033[1;35m' # Purple +BCyan='\033[1;36m' # Cyan +BWhite='\033[1;37m' # White + +# Underline +UBlack='\033[4;30m' # Black +URed='\033[4;31m' # Red +UGreen='\033[4;32m' # Green +UYellow='\033[4;33m' # Yellow +UBlue='\033[4;34m' # Blue +UPurple='\033[4;35m' # Purple +UCyan='\033[4;36m' # Cyan +UWhite='\033[4;37m' # White + +# Background +On_Black='\033[40m' # Black +On_Red='\033[41m' # Red +On_Green='\033[42m' # Green +On_Yellow='\033[43m' # Yellow +On_Blue='\033[44m' # Blue +On_Purple='\033[45m' # Purple +On_Cyan='\033[46m' # Cyan +On_White='\033[47m' # White + +# High Intensity +IBlack='\033[0;90m' # Black +IRed='\033[0;91m' # Red +IGreen='\033[0;92m' # Green +IYellow='\033[0;93m' # Yellow +IBlue='\033[0;94m' # Blue +IPurple='\033[0;95m' # Purple +ICyan='\033[0;96m' # Cyan +IWhite='\033[0;97m' # White + +# Bold High Intensity +BIBlack='\033[1;90m' # Black +BIRed='\033[1;91m' # Red +BIGreen='\033[1;92m' # Green +BIYellow='\033[1;93m' # Yellow +BIBlue='\033[1;94m' # Blue +BIPurple='\033[1;95m' # Purple +BICyan='\033[1;96m' # Cyan +BIWhite='\033[1;97m' # White + +# High Intensity backgrounds +On_IBlack='\033[0;100m' # Black +On_IRed='\033[0;101m' # Red +On_IGreen='\033[0;102m' # Green +On_IYellow='\033[0;103m' # Yellow +On_IBlue='\033[0;104m' # Blue +On_IPurple='\033[0;105m' # Purple +On_ICyan='\033[0;106m' # Cyan +On_IWhite='\033[0;107m' # White +###################### + +## HEADER +echo -e "${On_Green}==================================================================== +==== Tyleo Next Generation Script - Fedora Interactive Deployer ==== +====================================================================${Color_Off}" + +## HOST DETAILS +# SHOW +echo -e "${On_Green}= Host Informations${Color_Off}" +echo -e " Hostname : ${BGreen}$HOSTNAME${Color_Off}" +echo -e " Primary IP : ${BGreen}$(hostname -I | cut -d' ' -f1)$Color_Off" +echo -e " Time : ${BGreen}$(date)${Color_Off}" +echo -e " User : ${BGreen}$(whoami)${Color_Off}" +echo -e " UID/GID : ${BGreen}$UID${Color_Off}" +echo -e " HomeDir : ${BGreen}$HOME${Color_Off}" +echo -e " Language : ${BGreen}$LANG${Color_Off}" +echo -e "${On_Green}= ${Color_Off}" +###################### + +## BASE (UI) +prefix="Run=======/>" +errors="Error=====/>" +succes="Success===/>" +compat="Compat====/>" +askfor="Question==/>" +###################### + +## ROOT MODE CHECK (SUDO MODE OR SU MODE) +if [ "$UID" -ne 0 ] +then +echo -e "${Red}$errors Root mode not detected (current UID : ${BRed}$UID${Red}). You must run this script as root or via sudo command. (we recommend running as root mode after sudo su -)${Color_Off}" +exit +fi +###################### + +if [[ -f "$osrel" ]]; then + echo -e "${BCyan}$compat${Color_Off} Fedora was detected." + echo -e "${BYellow}$prefix${Color_Off} Continue Execution." +else + echo -e "${BCyan}$compat${Color_Off} Another OS is active on this machine. Incompatibility identified." + echo -e "${BYellow}$prefix${Color_Off} Exiting." + exit +fi + +## RANDOM PIN +pincode=$(shuf -i 1-100000 -n 1) +####################### + +## CONFIRMATION +echo -n -e "${BBlue}$askfor${Color_Off} Type this code to execute ($pincode) : " +read -r pinentered +if [[ "$pinentered" -ne "$pincode" ]] +then + echo -e "${BRed}$errors Pincode $pinentered received, there is an error here. Good Bye.${Color_Off}" + echo -e "${BRed}$errors Exiting...${Color_Off}" + exit +fi +echo -e "${BGreen}$succes Pincode $pinentered received, Accepted.${Color_Off}" +####################### +sleep 2 +clear +echo -e "${On_Blue}== Interactive Deployment Started - Welcome $(whoami) ==${Color_Off}" + +## Updating System +echo -e "${BYellow}$prefix${Color_Off} DNF:Updating Packages..." +echo -e "$BPurple" +dnf up -y --refresh +echo -e "$Color_Off" +echo -e "$Color_Off" + +## BASIC PACKAGES BY TYLEO (With auto mode) +echo -n -e "${BBlue}$askfor${Color_Off} Install Basic Package (Recommended, Include BTOP, HTOP and Glances) ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + clear + echo -e "${On_Blue}== Basic Package by Tyleo Dv. Delaware - Installation Processing ==${Color_Off}" + echo -e "${On_Blue}== htop btop duf fish zsh git nano glances ==${Color_Off}" + echo -e "${BYellow}$prefix${Color_Off} Installing Base Packages (recommended by Tyleo)..." + echo -e "${BYellow}$prefix${Color_Off} DNF:Installing Packages..." + echo -e "$BPurple" + dnf in -y htop btop duf fish zsh git nano glances + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Glances..." + systemctl enable glances + systemctl start glances +fi +accept="n" + +## DOCKER +echo -n -e "${BBlue}$askfor${Color_Off} Install Docker ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + clear + echo -e "${On_Blue}== Docker Community Edition - Installation Processing ==${Color_Off}" + echo -e "${BYellow}$prefix${Color_Off} DNF-CFG:Adding Docker CE Repo (Auto Rel)..." + dnf config-manager --add-repo=https://download.docker.com/linux/fedora/docker-ce.repo -y + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} DNF:Updating Index..." + echo -e "$BPurple" + dnf up -y --refresh + echo -e "$Color_Off" + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} DNF:Installing docker-ce..." + echo -e "$BPurple" + dnf in docker-ce -y + echo -e "$Color_Off" + wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop + chmod +x /usr/local/bin/ctop + wget http://s.tyleodev.fr/host-binary/lazydocker -O /usr/local/bin/lzd + chmod +x /usr/local/bin/lzd + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Docker and Docker Socket..." + systemctl enable docker.socket + systemctl enable docker + systemctl start docker.socket + systemctl start docker +fi +accept="n" + +## XRDP (RDS Mode, not recommended for Docker enabled host) +echo -n -e "${BBlue}$askfor${Color_Off} Install XRDP Server ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + clear + echo -e "${On_Blue}== X-Server Remote Desktop Services - Installation Processing ==${Color_Off}" + dnf up -y + echo -e "$Color_Off" + echo -e "$BPurple" + dnf in xrdp -y + echo -e "$Color_Off" + systemctl enable xrdp + systemctl enable xrdp-sesman + systemctl start xrdp + systemctl start xrdp-sesman +fi +accept="n" + +## GOOGLE CHROME // FOR RDS OR DESKTOP ONLY +chrome_rpm="https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm" +echo -n -e "${BBlue}$askfor${Color_Off} Install Google Chrome Browser ? (RDS or Desktop only !!)(Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + clear + echo -e "== ${BBlue}G${BRed}o${BYellow}o${BBlue}g${BGreen}l${BRed}e${Color_Off} Chrome - Installation Processing ==" + dnf up -y + echo -e "$Color_Off" + echo -e "$BPurple" + dnf in -y $chrome_rpm + echo -e "$Color_Off" +fi + +accept="n" + +echo -n -e "${BBlue}$askfor${Color_Off} Change Hostnames ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + clear + echo -n -e "${BBlue}$askfor${Color_Off} New Pretty Hostname (liberty) : " + read -r pHost + echo -n -e "${BBlue}$askfor${Color_Off} New Static Hostname (no-space,no-maj) : " + read -r sHost + echo -e "${Purple} Setting Hostname (Pretty)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$pHost" --pretty + echo -e "${Purple} Setting Hostname (Static)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$sHost" --static +fi +accept="n" + +echo -n -e "${BBlue}$askfor${Color_Off} Change Timezone ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + clear + echo -n -e "${BBlue}$askfor${Color_Off} Enter the Timezone (Zone/City) : " + read -r tzone + timedatectl set-timezone $tzone + echo -e "${Purple} Setting Timezone to $tzone${BGreen} [OK]${Color_Off}" +fi +accept="n" + +# TERMINATED +echo -e "${BGreen}$succes${Color_Off} Finished Deployement. Reboot is ${BGreen}recommended${Color_Off}." +echo -n -e "${BBlue}$askfor${Color_Off} Reboot Now ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + clear + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Reboot in 5 seconds...${Color_Off}" + sleep 1 + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Reboot in 4 seconds...${Color_Off}" + sleep 1 + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Reboot in 3 seconds...${Color_Off}" + sleep 1 + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Reboot in 2 seconds...${Color_Off}" + sleep 1 + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Reboot in 1 second ...${Color_Off}" + sleep 1 + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Reboot in 0 second ...${Color_Off}" + sleep 1 + echo -e + sudo reboot +fi +accept="n" \ No newline at end of file diff --git a/index/index.html b/index/index.html new file mode 100755 index 0000000..f008dfb --- /dev/null +++ b/index/index.html @@ -0,0 +1,156 @@ + + + + + + + Tyleo Setup Scripts & Outils + + + + + + + + + + +

+ Tyleo Setup
Scripts & Outils

Projet Safyr en version 4 (4.0.1.0)
Nouvelle Architecture de Scripts et de charges utiles.
TyleoDev™️ 2023

+

Lien de stockage
--------------------------
Setup Scripts/Composes
DevOps Scripts/Composes

+ + +

Installer les paquets sur un OS Linux (en début de conception)

+
⚠️ Certains scripts ne doivent être lancé qu'une seule fois, indiqués par "*". ⚠️
L'accés Sudo autorisé est nécessaire pour utiliser les scripts.
Si un script inclu une fonctionnalitée dangereuse, l'indicateur "📛" sera présent a coté de la commande. En cas de présence, il est vivement recommandé de vérifier le code du script avant execution. Tout les scripts sont testés avant mise en publication.
+

* Pour Debian/Ubuntu ou base DEB :

+ curl s.tyleodev.fr/setup/irp-deb | bash
+

* Pour Arch/ArchBase (Garuda Linux, EndeavourOS etc...) :

+ curl s.tyleodev.fr/setup/irp-arch | bash
+

* Pour RedHat Enterprise, CentOS, Rocky Linux, Fedora, AlmaLinux et toutes bases RHEL :

+ curl s.tyleodev.fr/setup/irp-rhel | bash
+

* Menu Interactif

+

Etape 1 : wget s.tyleodev.fr/setup/menu
Etape 2 : bash menu ou bash ./menu

+ + +

Installer des outils additionnels (Portainer, WatchTower etc...)

+
ℹ️ Le script irp-deb ne gère plus Portainer et WatchTower afin de permettre une gestion de leurs installations. +
Les scripts suivants remplacent cette intégration. De plus, WatchTower est rendu indépendant et +
dispose d'une version DEV et d'une version PRD. Bien respecter le mode d'usage !
+

Installer Portainer (port 9000/HTTPS)

+ curl s.tyleodev.fr/setup/irp-portainer | bash +

Installer WatchTower pour la Production (prd-updater)(image latest)

+ curl s.tyleodev.fr/setup/irp-dockerupd-prod | bash +

Installer WatchTower pour le Dev-Ops (dev-updater)(image latest-dev)

+ curl s.tyleodev.fr/setup/irp-dockerupd-dev | bash +

Installer CTOP (Task Manager pour Docker)

+ curl s.tyleodev.fr/setup/irp-ctop | bash +

Installer TMGR (Task Manager Tool), taskmgr / tmgr, Permet d'installer plusieurs gestionnaires de tâches et les lancer rapidement.

+ curl s.tyleodev.fr/setup/irp-taskmgr | bash +

Installer LazyDocker (Task Manager et Mastering pour Docker)(Inclu une variante LZD)

+
STD Edition :
+ curl s.tyleodev.fr/setup/irp-lazydocker | bash +
LZD Edition :
+ curl s.tyleodev.fr/setup/irp-lzd | bash + + +

Outils d'apprentissage

+
Pour ces outils, je conseille une machine virtuelle ou physique réservée a cet usage. +
Je déconseille vivement d'utiliser ces composes sur une Production active.
+

Installer le bac a sable (DistroBox)

+ curl s.tyleodev.fr/setup/irp-distrobox | bash +

Installer le pack de distribution (Distropack)(beta : possible bugs) - Inclus Debian, Ubuntu, Fedora, Rocky et KaliLinux.
Source GitHub et Infos additionnelles

+ curl s.tyleodev.fr/setup/irp-distropack | bash + + +

Outils de développement

+
Pour ces outils, je conseille une machine virtuelle ou physique réservée a cet usage.
Je déconseille vivement d'utiliser ces composes sur une Production active.
+

Télécharger les composes : +
Utilisez CURL, ARIA2C ou WGET pour les télécharger. +
Faite bien un dossier par compose téléchargé. +
Pour utiliser les composes.yml, utilisez docker-compose up -d

+

Les Test de Stress (performance, stabilité OS, test docker service)

+

StressTest LVL1 (One Node) : +
s.tyleodev.fr/devops/stress-testing/compose.yml
+
StressTest LVL2 (Five Node)[Stable for 4G Ram+] : +
s.tyleodev.fr/devops/stress-testing/level2-5nodes/compose.yml
+
StressTest LVL3 (Ten Node)[Dangerous, Be Aware, Stable for 8G Ram+] : +
s.tyleodev.fr/devops/stress-testing/level3-10nodes/compose.yml

+

Les Composes de Tests, Recettes et Développement +
Ces composes inclus un entrypoint de maintient actif (tail -f /dev/null)

+

Composes de test scripting : +
+ Pack BASH (10 instances) :
s.tyleodev.fr/devops/bash-testing/compose.yml

+ Pack KSH (10 instances) :
s.tyleodev.fr/devops/ksh-testing/compose.yml

+ Pack ZSH (10 instances) :
s.tyleodev.fr/devops/zsh-testing/compose.yml

+ Pack SH (10 instances) :
s.tyleodev.fr/devops/sh-testing/compose.yml

+ Pack Ubuntu-InRelease et DevRelease (3 instances, Ubuntu Jammy Jellyfish, Kinetic Kudu et Lunar Lobster) :
s.tyleodev.fr/devops/ubuntu-testing/compose.yml
+

+ + \ No newline at end of file diff --git a/interactive b/interactive new file mode 100755 index 0000000..1478e36 --- /dev/null +++ b/interactive @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +wget s.tyleodev.fr/setup/menu +bash ./menu +rm -f ./menu +exit \ No newline at end of file diff --git a/irp-addons b/irp-addons new file mode 100755 index 0000000..f88fca8 --- /dev/null +++ b/irp-addons @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +read -p "Installer les Alias de Tyleo (fichier sh dans profile.d) ?[O-Y/n]" ia +case $ia in + [OoYy] ) curl https://s.tyleodev.fr/irp-alias | sudo bash +esac + +read -p "Installer Oh-My-ZSH ?[O-Y/n]" ozh +case $ozh in + [OoYy] ) curl https://s.tyleodev.fr/irp-ozh | sudo bash +esac + +read -p "Installer Me, un petit script d'identité numérique créé par Tyleo ? (Ce n'est pas un virus, promis juré! [O-Y/n]" me +case $me in + [OoYy] ) sudo rm -f /bin/me + sudo wget https://s.tyleodev.fr/scr/me -O /bin/me + sudo chmod +x /bin/me + me +esac \ No newline at end of file diff --git a/irp-alias b/irp-alias new file mode 100755 index 0000000..8de757f --- /dev/null +++ b/irp-alias @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +echo Alias personnalisés de Tyleo - Addition +echo ---------------------------------------------------- +echo Fichier créé/modifié : /etc/profile.d/ty-alias.sh +echo Attention, ce script ajoute toujours les alias. +echo Plusieures éxecutions les ajoutera a nouveau. +echo ---------------------------------------------------- +aliassrc="/etc/profile.d/ty-alias.sh" +echo 'alias apty="sudo apt -y "' >> $aliassrc +echo 'alias dnfy="sudo dnf -y "' >> $aliassrc +echo 'alias yumy="sudo yum -y "' >> $aliassrc +echo 'alias nets="ip -c -br a"' >> $aliassrc +echo 'alias ltop="htop -d 1 -Ct"' >> $aliassrc +echo Alias installés ! \ No newline at end of file diff --git a/irp-aliasbytyleo b/irp-aliasbytyleo new file mode 100755 index 0000000..1747d87 --- /dev/null +++ b/irp-aliasbytyleo @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +if [ -d "/home/$USER/.oh-my-zsh" ]; then + echo "directory \"/home/$USER/.oh-my-zsh\" exists" +else + echo "Oh My ZSH must be installed (with ZSH)" + exit +fi + +curl static.tyleodev.fr/scr/.alias > ~/.oh-my-zsh/custom/tyleo-alias +touch ~/.oh-my-zsh/custom/personal-alias + +echo "To update, rerun this setup. WARN :" +echo "If you add aliases in this file (tyleo-alias)" +echo "everything will be OVERWRITTEN at update." +echo "use 'personal_alias' file instead." \ No newline at end of file diff --git a/irp-alp-base b/irp-alp-base new file mode 100755 index 0000000..306cf39 --- /dev/null +++ b/irp-alp-base @@ -0,0 +1,50 @@ +clear +echo ======================================= +echo = Server Node Installation Basic Mode = +echo ======================================= +echo '[cli] Patching Repos to Latest Stable...' +cp /etc/apk/repositories /etc/apk/repositories.backup +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/main > /etc/apk/repositories +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/community >> /etc/apk/repositories +echo '[apk] Updating Index...' +apk update +echo '[apk] Upgrading Packages to latest version before setup...' +apk upgrade +echo '[apk] Installing Base Packages...' +apk add curl wget aria2 screen sudo shadow htop btop nano vim fish bash zsh openssh bat fd ack ncdu exa +echo '[orc] Enabling OpenSSH Server Daemon...' +rc-update add sshd +service sshd start + +# Setup Service Account +clear +echo ======================================= +echo = Server Node Installation Basic Mode = +echo ======================================= +echo = Patching Sudo with Ruby Group Patch... +groupadd --gid 50000 ruby +echo "%ruby ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ruby-root +echo = Service Account Creation... +echo -n "= Username (lowercase): " +read Suid +echo = Creating $Suid... +useradd -d /home/service-$Suid -m $Suid +echo = Defining Shell to FiSH... +usermod --shell /usr/bin/fish $Suid +usermod --shell /usr/bin/fish root +echo = Adding to Groups Wheel, Ruby and Docker... +usermod -aG wheel $Suid +usermod -aG ruby $Suid +usermod -aG docker $Suid +echo = Set Password for $Suid Account... +passwd $Suid +echo = Setup $Suid Quick Sudo... + +# Setup DNS Client to Server +clear +echo ======================================= +echo = Server Node Installation Basic Mode = +echo ======================================= +mkdir -p /etc/udhcpc +echo RESOLV_CONF=no >> /etc/udhcpc/udhcpc.conf +setup-dns diff --git a/irp-alp-cs b/irp-alp-cs new file mode 100755 index 0000000..3bbe8b8 --- /dev/null +++ b/irp-alp-cs @@ -0,0 +1,9 @@ +clear +cp /etc/apk/repositories /etc/apk/repositories.backup-cs +echo @216m https://dl-cdn.alpinelinux.org/alpine/v3.16/main >> /etc/apk/repositories +echo @216c https://dl-cdn.alpinelinux.org/alpine/v3.16/community >> /etc/apk/repositories +apk add npm@216c nodejs@216m python3@216m +apk add alpine-sdk bash libstdc++ libc6-compat +npm config set python python3 +npm install zip yazl yauzl minimist @microsoft/1ds-core-js +curl -fsSL https://code-server.dev/install.sh | sh diff --git a/irp-alp-dck b/irp-alp-dck new file mode 100755 index 0000000..d9b0ca1 --- /dev/null +++ b/irp-alp-dck @@ -0,0 +1,61 @@ + + +clear +echo =========================================== +echo = Server Node Installation as Docker Host = +echo =========================================== +echo '[cli] Patching Repos to Latest Stable...' +cp /etc/apk/repositories /etc/apk/repositories.backup +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/main > /etc/apk/repositories +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/community >> /etc/apk/repositories +echo '[apk] Updating Index...' +apk update +echo '[apk] Upgrading Packages to latest version before setup...' +apk upgrade +echo '[apk] Installing Base Packages...' +apk add curl wget aria2 screen sudo shadow htop btop nano vim fish bash zsh openssh bat fd ack ncdu exa +echo '[orc] Enabling OpenSSH Server Daemon...' +rc-update add sshd +service sshd start +echo '[apk] Installing Docker Packages and LZD & VI Patch...' +apk add docker docker-compose lazydocker ctop +ln -s -f /usr/bin/nano /usr/bin/vi +ln -s -f /usr/bin/lazydocker /usr/bin/lzd +echo '[orc] Enabling Docker Containers Daemon...' +rc-update add docker +service docker start + +sleep 5 + +# Setup Service Account +clear +echo =========================================== +echo = Server Node Installation as Docker Host = +echo =========================================== +echo = Patching Sudo with Ruby Group Patch... +groupadd --gid 50000 ruby +echo "%ruby ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ruby-root +echo = Service Account Creation... +echo -n "= Username (lowercase): " +read Suid +echo = Creating $Suid... +useradd -d /home/service-$Suid -m $Suid +echo = Defining Shell to FiSH... +usermod --shell /usr/bin/fish $Suid +usermod --shell /usr/bin/fish root +echo = Adding to Groups Wheel, Ruby and Docker... +usermod -aG wheel $Suid +usermod -aG ruby $Suid +usermod -aG docker $Suid +echo = Set Password for $Suid Account... +passwd $Suid +echo = Setup $Suid Quick Sudo... + +# Setup DNS Client to Server +clear +echo =========================================== +echo = Server Node Installation as Docker Host = +echo =========================================== +mkdir -p /etc/udhcpc +echo RESOLV_CONF=no >> /etc/udhcpc/udhcpc.conf +setup-dns diff --git a/irp-alp-nfs-dck b/irp-alp-nfs-dck new file mode 100755 index 0000000..9181ac6 --- /dev/null +++ b/irp-alp-nfs-dck @@ -0,0 +1,35 @@ +sleep 2 +clear +echo ==================================================== +echo = Server Node Installation as Docker Host with NFS = +echo ==================================================== +echo '[cli] Patching Repos to Latest Stable...' +cp /etc/apk/repositories /etc/apk/repositories.backup +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/main > /etc/apk/repositories +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/community >> /etc/apk/repositories +echo '[apk] Updating Index...' +apk update +echo '[apk] Upgrading Packages to latest version before setup...' +apk upgrade +echo '[apk] Installing Base Packages...' +apk add curl wget aria2 screen sudo shadow htop btop nano vim fish bash zsh openssh bat fd ack ncdu exa nfs-utils +echo '[orc] Enabling OpenSSH Server Daemon...' +rc-update add sshd +service sshd start +echo '[apk] Installing Docker Packages and LZD & VI Patch...' +apk add docker docker-compose lazydocker ctop +ln -s -f /usr/bin/nano /usr/bin/vi +ln -s -f /usr/bin/lazydocker /usr/bin/lzd +echo '[orc] Adding RuBY Group (easy QS) ...' +groupadd --gid 50000 ruby +echo "%ruby ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ruby-root +mkdir /nfs && chmod 777 -R /nfs +sleep 2 +# Setup DNS Client to Server +mkdir -p /etc/udhcpc +echo RESOLV_CONF=no >> /etc/udhcpc/udhcpc.conf +setup-dns +sleep 2 +crontab -e +sleep 2 +reboot \ No newline at end of file diff --git a/irp-alp-rds b/irp-alp-rds new file mode 100755 index 0000000..57a79e9 --- /dev/null +++ b/irp-alp-rds @@ -0,0 +1,63 @@ +clear +echo ======================================= +echo = Server Node Installation RDS2S Mode = +echo ======================================= +echo '[cli] Patching Repos to Latest Stable...' +cp /etc/apk/repositories /etc/apk/repositories.backup +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/main > /etc/apk/repositories +echo https://dl-cdn.alpinelinux.org/alpine/latest-stable/community >> /etc/apk/repositories +echo '[apk] Updating Index...' +apk update +echo '[apk] Upgrading Packages to latest version before setup...' +apk upgrade +echo '[apk] Installing Base Packages...' +apk add curl wget aria2 screen sudo shadow htop btop nano vim fish bash zsh openssh xrdp xorgxrdp chromium bat fd ack ncdu exa +apk add plasma +echo '[orc] Enabling OpenSSH Server Daemon...' +rc-update add sshd +service sshd start +echo '[orc] Enabling XRDP Server Daemon...' +rc-update add xrdp +service xrdp start +rc-update add xrdp-sesman +service xrdp-sesman start + +# Setup Service Account +clear +echo ======================================= +echo = Server Node Installation RDS2S Mode = +echo ======================================= +echo = Patching Sudo with Ruby Group Patch... +groupadd --gid 50000 ruby +echo "%ruby ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ruby-root +echo = Service Account Creation... +echo -n "= Username (lowercase): " +read Suid +echo = Creating $Suid... +useradd -d /home/service-$Suid -m $Suid +echo = Defining Shell to FiSH... +usermod --shell /usr/bin/fish $Suid +usermod --shell /usr/bin/fish root +echo = Adding to Groups Wheel, Ruby and Docker... +usermod -aG wheel $Suid +usermod -aG ruby $Suid +usermod -aG docker $Suid +echo = Set Password for $Suid Account... +passwd $Suid +echo = Setup $Suid Quick Sudo... + +# Setup DNS Client to Server +clear +echo ======================================= +echo = Server Node Installation RDS2S Mode = +echo ======================================= +mkdir -p /etc/udhcpc +echo RESOLV_CONF=no >> /etc/udhcpc/udhcpc.conf +setup-dns + +# Setup Desktop User to Server +clear +echo ======================================= +echo = Server Node Installation RDS2S Mode = +echo ======================================= +setup-desktop \ No newline at end of file diff --git a/irp-apanel-deb b/irp-apanel-deb new file mode 100755 index 0000000..2c6632b --- /dev/null +++ b/irp-apanel-deb @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +echo Ajenti Installer v1 - Core 2 Edition +sudo add-apt-repository universe +sudo apt-get install build-essential python3-pip python3-dev python3-lxml libssl-dev python3-dbus python3-augeas python3-apt ntpdate -y +sudo pip3 install setuptools pip wheel -U +sudo pip3 install ajenti-panel ajenti.plugin.ace ajenti.plugin.augeas ajenti.plugin.auth-users ajenti.plugin.core ajenti.plugin.dashboard ajenti.plugin.datetime ajenti.plugin.filemanager ajenti.plugin.filesystem ajenti.plugin.network ajenti.plugin.notepad ajenti.plugin.packages ajenti.plugin.passwd ajenti.plugin.plugins ajenti.plugin.power ajenti.plugin.services ajenti.plugin.settings ajenti.plugin.terminal diff --git a/irp-arch b/irp-arch new file mode 100755 index 0000000..5ceafc7 --- /dev/null +++ b/irp-arch @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +if ! command -v pacman &> /dev/null +then + echo "Systéme non PACMAN-ARCH - Lancement annulé" + echo "Script incompatible. Vérifiez sur:" + echo "https://tyleodev.fr/scripts-crees-par-tyleo/" + exit +fi +echo ------------------------------------------------------------- +curl https://static.tyleodev.fr/astra/banner-arch +echo Version 2.1 - Script de Déploiement Public avec FISH et HTOP. +echo Ce script configure Cockpit et active la WebUI sur le port 9090 général. +echo ------------------------------------------------------------- + +echo "[INFO] Updating Pacman Database and Update System to latest Roll..." +sudo pacman -q -Syyu --noconfirm yay fish htop +echo "[INFO] Installing Packages for Cockpit Linux Web Administration Interface with plugins PCP, StorageD and PackageKit..." +sudo pacman -q -Sy --noconfirm cockpit cockpit-storaged cockpit-packagekit cockpit-pcp +echo "[INFO] Enabling Cockpit Socket (WebUI on ALL:9090)" +sudo systemctl enable cockpit.socket +sudo systemctl start cockpit.socket +echo "[INFO] Installing Packages for Docker, Docker-Compose..." +sudo pacman -q -Sy --noconfirm docker docker-compose docker-machine +echo "[INFO] Enabling Docker Socket for Run (No WebSocket - /var/run/docker.socket)..." +sudo systemctl enable docker.socket +sudo systemctl enable docker +sudo systemctl start docker.socket +sudo systemctl start docker +echo "[INFO] Configuring Portainer.IO controller and WatchTower module..." +echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER +sudo usermod -a -G docker $USER +sudo chown $USER:docker /var/run/docker.sock +sudo docker volume create portainer_data +sudo docker container stop portainer +sudo docker container rm portainer +sudo docker run -d -p 8000:8000 -p 10443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest +sudo docker container stop watchtower +sudo docker container rm watchtower +sudo docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name watchtower --restart=always containrrr/watchtower:latest +echo "[INFO] Enabling Quicksudo on $USER..." +sudo echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER +echo Quick Sudo installed for $USER user. + +echo "[INFO] OPERATION TERMINEE - SYSTEME PRET" diff --git a/irp-arch-rdp b/irp-arch-rdp new file mode 100755 index 0000000..3ab1b2d --- /dev/null +++ b/irp-arch-rdp @@ -0,0 +1,100 @@ +#!/bin/bash + +# +# This script is for Arch Linux to configure XRDP for enhanced session mode +# +# The configuration is adapted from the Ubuntu 16.04 script. +# +# Script adapted from https://github.com/microsoft/linux-vm-tools +# + +if [ "$(id -u)" -ne 0 ]; then + echo 'This script must be run with root privileges' >&2 + exit 1 +fi + +# Use Qi to check for exact package name +if ! pacman -Qi xrdp > /dev/null ; then + echo 'xrdp not installed. Installing now...' >&2 + sudo pacman -Syu --needed --noconfirm base base-devel git + sudo yay -Syu xrdp-git --noconfirm +fi + +# Use Qs to allow xorgxrdp-devel-git +if ! pacman -Qs xorgxrdp > /dev/null ; then + echo 'xorgxrdp not installed. Installing now...' >&2 + sudo pacman -Syu --needed --noconfirm base base-devel git + yay -Syu xorgxrdp-git --noconfirm +fi + +############################################################################### +# Configure XRDP +# +systemctl enable xrdp +systemctl enable xrdp-sesman + +# Configure the installed XRDP ini files. +# use rdp security. +sed -i_orig -e 's/security_layer=negotiate/security_layer=rdp/g' /etc/xrdp/xrdp.ini +# remove encryption validation. +sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini +# disable bitmap compression since its local its much faster +sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini +# +# sed -n -e 's/max_bpp=32/max_bpp=24/g' /etc/xrdp/xrdp.ini + +# use the default lightdm x display +# sed -i_orig -e 's/X11DisplayOffset=10/X11DisplayOffset=0/g' /etc/xrdp/sesman.ini +# rename the redirected drives to 'shared-drives' +sed -i_orig -e 's/FuseMountName=thinclient_drives/FuseMountName=shared-drives/g' /etc/xrdp/sesman.ini + +# Change the allowed_users +echo "allowed_users=anybody" > /etc/X11/Xwrapper.config + + +#Ensure hv_sock gets loaded +if [ ! -e /etc/modules-load.d/hv_sock.conf ]; then + echo "hv_sock" > /etc/modules-load.d/hv_sock.conf +fi + +# Configure the policy xrdp session +cat > /etc/polkit-1/rules.d/02-allow-colord.rules < /etc/pam.d/xrdp-sesman <> /etc/pacman.conf +echo "Include = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf +pacman -Syyu --noconfirm diff --git a/irp-chrome-deb b/irp-chrome-deb new file mode 100755 index 0000000..d6025bc --- /dev/null +++ b/irp-chrome-deb @@ -0,0 +1,8 @@ +wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O Chrome-Current.deb +sleep 1 +sudo apt update +sudo apt upgrade -y +sudo apt install -y ./Chrome-Current.deb +sleep 1 +rm -f ./Chrome-Current.deb + diff --git a/irp-chrome-dnf b/irp-chrome-dnf new file mode 100755 index 0000000..d31efbe --- /dev/null +++ b/irp-chrome-dnf @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +clear + + +## FEDORA BASEOS FILES +osrel="/etc/fedora-release" +###################### + +## COLORS +# Reset +Color_Off='\033[0m' # Text Reset + +# Regular Colors +Black='\033[0;30m' # Black +Red='\033[0;31m' # Red +Green='\033[0;32m' # Green +Yellow='\033[0;33m' # Yellow +Blue='\033[0;34m' # Blue +Purple='\033[0;35m' # Purple +Cyan='\033[0;36m' # Cyan +White='\033[0;37m' # White + +# Bold +BBlack='\033[1;30m' # Black +BRed='\033[1;31m' # Red +BGreen='\033[1;32m' # Green +BYellow='\033[1;33m' # Yellow +BBlue='\033[1;34m' # Blue +BPurple='\033[1;35m' # Purple +BCyan='\033[1;36m' # Cyan +BWhite='\033[1;37m' # White + +# Underline +UBlack='\033[4;30m' # Black +URed='\033[4;31m' # Red +UGreen='\033[4;32m' # Green +UYellow='\033[4;33m' # Yellow +UBlue='\033[4;34m' # Blue +UPurple='\033[4;35m' # Purple +UCyan='\033[4;36m' # Cyan +UWhite='\033[4;37m' # White + +# Background +On_Black='\033[40m' # Black +On_Red='\033[41m' # Red +On_Green='\033[42m' # Green +On_Yellow='\033[43m' # Yellow +On_Blue='\033[44m' # Blue +On_Purple='\033[45m' # Purple +On_Cyan='\033[46m' # Cyan +On_White='\033[47m' # White + +# High Intensity +IBlack='\033[0;90m' # Black +IRed='\033[0;91m' # Red +IGreen='\033[0;92m' # Green +IYellow='\033[0;93m' # Yellow +IBlue='\033[0;94m' # Blue +IPurple='\033[0;95m' # Purple +ICyan='\033[0;96m' # Cyan +IWhite='\033[0;97m' # White + +# Bold High Intensity +BIBlack='\033[1;90m' # Black +BIRed='\033[1;91m' # Red +BIGreen='\033[1;92m' # Green +BIYellow='\033[1;93m' # Yellow +BIBlue='\033[1;94m' # Blue +BIPurple='\033[1;95m' # Purple +BICyan='\033[1;96m' # Cyan +BIWhite='\033[1;97m' # White + +# High Intensity backgrounds +On_IBlack='\033[0;100m' # Black +On_IRed='\033[0;101m' # Red +On_IGreen='\033[0;102m' # Green +On_IYellow='\033[0;103m' # Yellow +On_IBlue='\033[0;104m' # Blue +On_IPurple='\033[0;105m' # Purple +On_ICyan='\033[0;106m' # Cyan +On_IWhite='\033[0;107m' # White +###################### + +## GOOGLE CHROME // FOR RDS OR DESKTOP ONLY +chrome_rpm="https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm" +clear +echo -e "== ${BBlue}G${BRed}o${BYellow}o${BBlue}g${BGreen}l${BRed}e${Color_Off} Chrome - Installation Processing ==" +echo -n -e "${BBlue}$askfor${Color_Off} Install Google Chrome Browser ? (RDS or Desktop only !!)(Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + dnf up -y + echo -e "$Color_Off" + echo -e "$BPurple" + dnf in -y $chrome_rpm + echo -e "$Color_Off" + sleep 3 +fi + diff --git a/irp-ckpupd.deb b/irp-ckpupd.deb new file mode 100755 index 0000000..6cf99a9 --- /dev/null +++ b/irp-ckpupd.deb @@ -0,0 +1 @@ +apt upgrade -y cockpit cockpit-ws cockpit-system cockpit-storaged cockpit-navigator cockpit-networkmanager cockpit-ostree cockpit-packagekit cockpit-pcp cockpit-podman cockpit-selinux cockpit-session-recording cockpit-sosreport cockpit-tests cockpit-389-ds cockpit-bridge cockpit-composer cockpit-doc cockpit-file-sharing cockpit-kdump cockpit-machines \ No newline at end of file diff --git a/irp-ckpupd.dnf b/irp-ckpupd.dnf new file mode 100755 index 0000000..4ddc507 --- /dev/null +++ b/irp-ckpupd.dnf @@ -0,0 +1 @@ +dnf upgrade -y cockpit cockpit-ws cockpit-system cockpit-storaged cockpit-navigator cockpit-networkmanager cockpit-ostree cockpit-packagekit cockpit-pcp cockpit-podman cockpit-selinux cockpit-session-recording cockpit-sosreport cockpit-tests cockpit-389-ds cockpit-bridge cockpit-composer cockpit-doc cockpit-file-sharing cockpit-kdump cockpit-machines \ No newline at end of file diff --git a/irp-cockpit-nav b/irp-cockpit-nav new file mode 100755 index 0000000..d1054dc --- /dev/null +++ b/irp-cockpit-nav @@ -0,0 +1,7 @@ + +sudo apt-get install cockpit -y +sudo dnf install cockpit -y + +sudo wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator_0.5.8-1focal_all.deb +sudo apt-get install ./cockpit-navigator_0.5.8-1focal_all.deb -y +sudo dnf install https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm diff --git a/irp-cptnav b/irp-cptnav new file mode 100755 index 0000000..719c3c2 --- /dev/null +++ b/irp-cptnav @@ -0,0 +1,5 @@ + +apt-get install cockpit -y + +wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator_0.5.8-1focal_all.deb +apt-get install ./cockpit-navigator_0.5.8-1focal_all.deb -y diff --git a/irp-ctop b/irp-ctop new file mode 100755 index 0000000..bae4d4e --- /dev/null +++ b/irp-ctop @@ -0,0 +1,16 @@ +clear +curl https://static.tyleodev.fr/astra/banner-all +echo "---------------------------------------------------------" +echo "/> Installing CTOP..." +sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /bin/ctop +sudo chmod +x /bin/ctop +echo "---------------------------------------------------------" +sleep 1 +clear +curl https://static.tyleodev.fr/astra/banner-all +echo "---------------------------------------------------------" +echo "-- Commande : ctop --" +echo "-- Emplacement : /bin/ctop --" +echo "-- Requis : docker (run), docker.socket (service) --" +echo "---------------------------------------------------------" +echo "/> Terminé." \ No newline at end of file diff --git a/irp-cts-arch b/irp-cts-arch new file mode 100755 index 0000000..5be746d --- /dev/null +++ b/irp-cts-arch @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +clear +echo "/>[info] Welcome - Bienvenue - Bienvenido - مرحبا بكم - 欢迎 - いらっしゃいませ" +echo "/>[info] Script IRP-CTS for ArchLinux Based v1.2 pour Safyr VI-2 par Tyleo Dev™️ - Convertisseur de distribution vers un usage Serveur (sans bureau)" +echo "===================================================================================================================================================" +echo " This Script support ArchLinux based systems with XFCE as desktop (Manjaro XFCE for example)." +echo "===================================================================================================================================================" +echo "/>[info] Vérification de l'OS ..." +if ! command -v pacman 1> /dev/null +then + echo "/>[error] Systéme non ARCH - Lancement annulé" + exit +fi + +echo "!>[WARNING] Si il s'agit d'un PC de bureau ou d'une installation pour usage normal, faite CTRL+C dans les 10 secondes qui suivent !!" +sleep 10 +echo "/>(info) PACMAN Détécté ==> OK" +echo "/>[pacman] Mise à jour de l'Index PACMAN" +sudo pacman -Sy --noconfirm +echo "/>[pacman] Suppression des paquets de Bureau (DE) ..." +sudo pacman xfce4 --noconfirm -Rc +sudo pacman xorg --noconfirm -Rc +sudo pacman xorg-xinit --noconfirm -Rc +sudo pacman libx11 --noconfirm -Rc +sudo pacman lib32-libx11 --noconfirm -Rc +sudo pacman qt5-base --noconfirm -Rc +sudo pacman qt6-base --noconfirm -Rc +sudo pacman gtk2 --noconfirm -Rc +sudo pacman gtk3 --noconfirm -Rc +sudo pacman gtk4 --noconfirm -Rc +sudo pacman lightdm-gtk-greeter --noconfirm -Rc +echo "/>[pacman] Installation de l'administration serveur (Cockpit, SSHD) ..." +sudo pacman -Sy --noconfirm cockpit +echo "/>[pacman] Installation des paquets de gestion serveur (Yay, Btop, Ctop, Docker Pack et LazyDocker) ..." +sudo pacman -Sy --noconfirm btop yay ctop docker docker-compose screen +echo "/>[systemctl] Enabling Services ..." +sudo systemctl enable --now docker.socket +sudo systemctl enable --now cockpit.socket +sudo systemctl enable --now sshd +sudo systemctl enable --now ssh +echo "/>[info] Conversion Terminée, un reboot est nécessaire. Reboot dans 5 secondes." +sudo sed -i 's/Manjaro/Manjaro Server Edition/g' /etc/os-release +sleep 5 +sudo reboot -f \ No newline at end of file diff --git a/irp-cts-deb b/irp-cts-deb new file mode 100755 index 0000000..a641853 --- /dev/null +++ b/irp-cts-deb @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +clear +echo "/>[info] Welcome - Bienvenue - Bienvenido - مرحبا بكم - 欢迎 - いらっしゃいませ" +echo "/>[info] Script IRP-CONVERTTOSERVER v1 pour Safyr IV par Tyleo Dev™️ - Convertisseur de distribution vers un usage Serveur (sans bureau)" + +echo "/>[info] Vérification de l'OS ..." +if ! command -v dpkg 1> /dev/null +then + echo "/>[error] Systéme non DEB - Lancement annulé" + echo "/>[error] Utilisez irp-rhel pour RPM." + echo "/>[info] curl s.tyleodev.fr/setup/irp-rhel | bash" + exit +fi + +echo "!>[WARNING] Si il s'agit d'un PC de bureau ou d'une installation pour usage normal, faite CTRL+C dans les 10 secondes qui suivent !!" +sleep 10 +echo "/>(info) DPKG Détécté ==> OK" +echo "/>[apt] Mise à jour de l'Index APT" +sudo apt-get update +echo "/>[apt] Suppression des paquets de Bureau (DE) ..."e +sudo apt-get purge plymouth -y +sudo apt-get remove libx11.* libqt.* libgtk.* -y +echo "/>[info] Conversion Terminée, un reboot est nécessaire. Reboot dans 5 secondes." +sleep 5 +sudo reboot -f \ No newline at end of file diff --git a/irp-deb b/irp-deb new file mode 100755 index 0000000..a3af98c --- /dev/null +++ b/irp-deb @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +clear +echo "/>[info] Welcome - Bienvenue - Bienvenido - مرحبا بكم - 欢迎 - いらっしゃいませ" +echo "/>[info] Script IRP-DEB v2 pour Safyr IV par Tyleo Dev™️ - Déploiement d'OS Debian Base Développé sur Ubuntu 22.04+, compatible Lunar Lobster +" + +echo "/>[info] Vérification de l'OS ..." +if ! command -v dpkg 1> /dev/null +then + echo "/>[error] Systéme non DEB - Lancement annulé" + echo "/>[error] Utilisez irp-rhel pour RPM." + echo "/>[info] curl s.tyleodev.fr/setup/irp-rhel | bash" + exit +fi + +echo "/>(info) DPKG Détécté ==> OK" +echo "/>[apt] Mise à jour de l'Index APT" +sudo apt-get update 1>/dev/null +echo "/>[apt] Installation des paquets recommandés (mc zsh git tuned curl wget mc htop nethogs figlet nano) ..." +sudo apt-get install mc zsh git tuned curl wget mc htop nethogs figlet nano -y 1>/dev/null +echo "/>[apt] Installation des Gestionnaires de tâches UNIX/Linux (htop btop atop top) ..." +sudo apt-get install htop btop atop -y 1>/dev/null +echo "/>[apt] Installation des Consoles d'administrations basiques (netdata-web cockpit) ..." +sudo apt-get install netdata-web cockpit -y 1>/dev/null +sudo apt-get install ca-certificates curl gnupg -y +sudo install -m 0755 -d /etc/apt/keyrings +sudo apt update +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg +sudo chmod a+r /etc/apt/keyrings/docker.gpg +echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt update +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y + +echo "/>[wget] Téléchargement de Cockpit-Docker depuis https://launchpad.net ..." +sudo wget https://launchpad.net/ubuntu/+source/cockpit/215-1~ubuntu19.10.1/+build/18889196/+files/cockpit-docker_215-1~ubuntu19.10.1_all.deb 1>/dev/null +echo "/>[wget] Téléchargement de GOTOP depuis https://github.com ..." +sudo wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.deb 1>/dev/null +echo "/>[wget] Téléchargement de Cockpit-Navigator depuis https://github.com ..." +sudo wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.10/cockpit-navigator_0.5.10-1focal_all.deb 1>/dev/null +echo "/>[wget] Téléchargement de DUF depuis https://github.com ..." +sudo wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb 1>/dev/null + +echo "/>[apt] Installation de DUF en cours..." +sudo apt-get install ./duf_0.8.1_linux_amd64.deb 1>/dev/null +echo "/>[apt] Installation de GOTOP en cours..." +sudo apt-get install ./gotop_v4.1.4_linux_amd64.deb -y 1>/dev/null +echo "/>[apt] Installation de Cockpit-Docker en cours..." +curl s.tyleodev.fr/setup/irp-cdocker | bash +echo "/>[apt] Installation de Cockpit-Navigator en cours..." +sudo apt-get install ./cockpit-navigator_0.5.10-1focal_all.deb -y 1>/dev/null +echo "/>[wget/bash] Installation de CTOP depuis https://github.com en auto exec ..." +sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /bin/ctop 1>/dev/null +sudo chmod +x /bin/ctop + +echo "/>[info] Nettoyage des fichiers DEB téléchargés ..." +sudo rm -f ./gotop_v4.1.4_linux_amd64.deb 1>/dev/null +sudo rm -f ./cockpit-navigator_0.5.10-1focal_all.deb 1>/dev/null +sudo rm -f ./duf_0.8.1_linux_amd64.deb 1>/dev/null + +echo "/>[ qs ] Application du QuickSudo ..." +echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" > sudo /etc/sudoers.d/$USER + +echo Terminé. diff --git a/irp-deb-mozilla b/irp-deb-mozilla new file mode 100755 index 0000000..7fd239c --- /dev/null +++ b/irp-deb-mozilla @@ -0,0 +1,7 @@ +wget https://s.tyleodev.fr/setup/repo/mozilla.list -O /etc/apt/sources.list.d/mozilla.list +sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2667CA5C +sudo apt update +sudo apt install firefox-mozilla-build -y +sudo apt install firefox-esr-mozilla-build -y +sudo apt install thunderbird-mozilla-build -y +sudo apt install seamonkey-mozilla-build -y \ No newline at end of file diff --git a/irp-distrobox b/irp-distrobox new file mode 100755 index 0000000..c27692f --- /dev/null +++ b/irp-distrobox @@ -0,0 +1,3 @@ +curl https://static.tyleodev.fr/astra/banner-all +echo DistroBox Installer +curl https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh diff --git a/irp-distropack b/irp-distropack new file mode 100755 index 0000000..d3f7eb6 --- /dev/null +++ b/irp-distropack @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +clear +if ! command -v distrobox &> /dev/null +then + echo "Distrobox n'est pas installé." + curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh +fi +curl https://static.tyleodev.fr/astra/banner-all +echo +echo DistroBox Distribution Package - v1 +sudo chmod 777 /var/run/docker.sock +sudo usermod -aG docker $USER + +docker image pull docker.io/ubuntu:latest +docker image pull docker.io/fedora:latest +docker image pull docker.io/debian:latest +docker image pull docker.io/rockylinux/rockylinux:latest +docker image pull docker.io/kalilinux/kali-rolling:latest + +distrobox-create --root -Y --name Ubuntu-$USER --image docker.io/ubuntu:latest +distrobox-create --root -Y --name Fedora-$USER --image docker.io/fedora:latest +distrobox-create --root -Y --name Rocky-$USER --image docker.io/rockylinux/rockylinux:latest +distrobox-create --root -Y --name Kali-$USER --image docker.io/kalilinux/kali-rolling:latest +distrobox-create --root -Y --name Debian-$USER --image docker.io/debian:latest +ls +sudo mkdir /etc/distropack +sudo mkdir /etc/distropack/Ubuntu-$USER +sudo mkdir /etc/distropack/Kali-$USER +sudo mkdir /etc/distropack/Debian-$USER +sudo mkdir /etc/distropack/Fedora-$USER +sudo mkdir /etc/distropack/Rocky-$USER + +echo "Aller dans /etc/distropack" +echo "puis faire distrobox-enter --root et appuyer sur TAB pour choisir la distro." \ No newline at end of file diff --git a/irp-docker-debian12 b/irp-docker-debian12 new file mode 100755 index 0000000..c207e42 --- /dev/null +++ b/irp-docker-debian12 @@ -0,0 +1,9 @@ +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg +sudo install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg +sudo chmod a+r /etc/apt/keyrings/docker.gpg +echo \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null diff --git a/irp-dockerdash b/irp-dockerdash new file mode 100755 index 0000000..fd4c175 --- /dev/null +++ b/irp-dockerdash @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +clear +curl static.tyleodev.fr/astra/scr_banner + +sudo apt update +sudo apt install bash figlet -y +sudo rm docker-dash -f +sudo rm /bin/docker-dash -f +sudo curl https://static.tyleodev.fr/scr/docker-dash.bash > docker-dash +sudo chmod 777 docker-dash +sudo mv docker-dash /bin +sudo chmod +x /bin/docker-dash diff --git a/irp-dockerupd-dev b/irp-dockerupd-dev new file mode 100755 index 0000000..5b9ce96 --- /dev/null +++ b/irp-dockerupd-dev @@ -0,0 +1,25 @@ + +echo "------------------------------------------------" +echo "- Docker Developer Server Updater ---- 1.0.0.0 -" +echo "- Image : containrrr/watchtower / Dev ----------" +echo "------------------------------------------------" +docker stop dev-updater +sleep 1 +echo "------------------------------------------------" +docker kill dev-updater +sleep 1 +echo "------------------------------------------------" +docker rm dev-updater +sleep 1 +echo "------------------------------------------------" +docker run -d \ + --name dev-updater \ + -e WATCHTOWER_CLEANUP=true \ + -e WATCHTOWER_DEBUG=true \ + -e WATCHTOWER_SCHEDULE="0 2 * * 1" \ + -v /var/run/docker.sock:/var/run/docker.sock \ + containrrr/watchtower:latest-dev +echo "------------------------------------------------" +echo " Terminé. Service Actif en tant que dev-updater" +echo "------------------------------------------------" +echo "" \ No newline at end of file diff --git a/irp-dockerupd-prod b/irp-dockerupd-prod new file mode 100755 index 0000000..d9475ec --- /dev/null +++ b/irp-dockerupd-prod @@ -0,0 +1,24 @@ +echo "------------------------------------------------" +echo "- Docker Production Server Updater --- 1.0.0.0 -" +echo "- Image : containrrr/watchtower / Production ---" +echo "------------------------------------------------" +docker stop prd-updater +sleep 1 +echo "------------------------------------------------" +docker kill prd-updater +sleep 1 +echo "------------------------------------------------" +docker rm prd-updater +sleep 1 +echo "------------------------------------------------" +docker run -d \ + --name prd-updater \ + -e WATCHTOWER_CLEANUP=true \ + -e WATCHTOWER_DEBUG=true \ + -e WATCHTOWER_SCHEDULE="0 0 * * *" \ + -v /var/run/docker.sock:/var/run/docker.sock \ + containrrr/watchtower:latest +echo "------------------------------------------------" +echo " Terminé. Service Actif en tant que prd-updater" +echo "------------------------------------------------" +echo "" \ No newline at end of file diff --git a/irp-dp-deb b/irp-dp-deb new file mode 100755 index 0000000..e3ba924 --- /dev/null +++ b/irp-dp-deb @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +echo DistroBox Distribution Pack - v1 +echo Terminator App Export +sudo apt install terminator nautilus htop gedit screenfetch -y +sudo apt install geany -y +distrobox-export --app terminator +distrobox-export --app nautilus +distrobox-export --app htop +distrobox-export --app gedit +distrobox-export --app geany + + + diff --git a/irp-dp-rhel b/irp-dp-rhel new file mode 100755 index 0000000..bfb1783 --- /dev/null +++ b/irp-dp-rhel @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +echo DistroBox Distribution Pack - v1 +echo Terminator App Export +sudo dnf install epel-release -y +sudo dnf install terminator nautilus htop gedit -y +sudo dnf install geany -y +distrobox-export --app terminator +distrobox-export --app nautilus +distrobox-export --app htop +distrobox-export --app gedit +distrobox-export --app geany + + + diff --git a/irp-dp-suse b/irp-dp-suse new file mode 100755 index 0000000..25183d0 --- /dev/null +++ b/irp-dp-suse @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +echo DistroBox Distribution Pack - v1 +echo Terminator App Export +sudo zypper -n install terminator nautilus htop gedit screenfetch geany +distrobox-export --app terminator +distrobox-export --app nautilus +distrobox-export --app htop +distrobox-export --app gedit +distrobox-export --app geany \ No newline at end of file diff --git a/irp-duf b/irp-duf new file mode 100755 index 0000000..8b08e7b --- /dev/null +++ b/irp-duf @@ -0,0 +1,5 @@ +wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb +sudo dpkg -i duf_0.8.1_linux_amd64.deb +sudo apt-get --fix-broken install -y +wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.rpm +sudo rpm -i duf_0.8.1_linux_amd64.rpm \ No newline at end of file diff --git a/irp-europe b/irp-europe new file mode 100755 index 0000000..ad2f19b --- /dev/null +++ b/irp-europe @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sudo timedatectl set-timezone Europe/Paris \ No newline at end of file diff --git a/irp-f2b b/irp-f2b new file mode 100755 index 0000000..2d53abb --- /dev/null +++ b/irp-f2b @@ -0,0 +1,13 @@ + +clear +curl static.tyleodev.fr/astra/scr_banner +echo APT CACHE UPDATING... +sudo apt update &>/dev/null +echo APT CACHE UPDATED +sudo apt install -y fail2ban figlet +figlet Fail2Ban by Tyleo +sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local +sudo service fail2ban restart +echo "By Default, attacks will be blocked by ports, then after 10 attacks, the IP will be banned and the port will be closed (by connect)" +echo +echo "Tyleo-SH (C) 2022" \ No newline at end of file diff --git a/irp-fedora b/irp-fedora new file mode 100755 index 0000000..bd5a6d4 --- /dev/null +++ b/irp-fedora @@ -0,0 +1,374 @@ +#!/usr/bin/env bash +clear + + +## FEDORA BASEOS FILES +osrel="/etc/fedora-release" +###################### + +## COLORS +# Reset +Color_Off='\033[0m' # Text Reset + +# Regular Colors +Black='\033[0;30m' # Black +Red='\033[0;31m' # Red +Green='\033[0;32m' # Green +Yellow='\033[0;33m' # Yellow +Blue='\033[0;34m' # Blue +Purple='\033[0;35m' # Purple +Cyan='\033[0;36m' # Cyan +White='\033[0;37m' # White + +# Bold +BBlack='\033[1;30m' # Black +BRed='\033[1;31m' # Red +BGreen='\033[1;32m' # Green +BYellow='\033[1;33m' # Yellow +BBlue='\033[1;34m' # Blue +BPurple='\033[1;35m' # Purple +BCyan='\033[1;36m' # Cyan +BWhite='\033[1;37m' # White + +# Underline +UBlack='\033[4;30m' # Black +URed='\033[4;31m' # Red +UGreen='\033[4;32m' # Green +UYellow='\033[4;33m' # Yellow +UBlue='\033[4;34m' # Blue +UPurple='\033[4;35m' # Purple +UCyan='\033[4;36m' # Cyan +UWhite='\033[4;37m' # White + +# Background +On_Black='\033[40m' # Black +On_Red='\033[41m' # Red +On_Green='\033[42m' # Green +On_Yellow='\033[43m' # Yellow +On_Blue='\033[44m' # Blue +On_Purple='\033[45m' # Purple +On_Cyan='\033[46m' # Cyan +On_White='\033[47m' # White + +# High Intensity +IBlack='\033[0;90m' # Black +IRed='\033[0;91m' # Red +IGreen='\033[0;92m' # Green +IYellow='\033[0;93m' # Yellow +IBlue='\033[0;94m' # Blue +IPurple='\033[0;95m' # Purple +ICyan='\033[0;96m' # Cyan +IWhite='\033[0;97m' # White + +# Bold High Intensity +BIBlack='\033[1;90m' # Black +BIRed='\033[1;91m' # Red +BIGreen='\033[1;92m' # Green +BIYellow='\033[1;93m' # Yellow +BIBlue='\033[1;94m' # Blue +BIPurple='\033[1;95m' # Purple +BICyan='\033[1;96m' # Cyan +BIWhite='\033[1;97m' # White + +# High Intensity backgrounds +On_IBlack='\033[0;100m' # Black +On_IRed='\033[0;101m' # Red +On_IGreen='\033[0;102m' # Green +On_IYellow='\033[0;103m' # Yellow +On_IBlue='\033[0;104m' # Blue +On_IPurple='\033[0;105m' # Purple +On_ICyan='\033[0;106m' # Cyan +On_IWhite='\033[0;107m' # White +###################### + + +## HEADER +echo -e "${On_Green}==================================================================== +==== Tyleo Next Generation Script - Fedora Interactive Deployer ==== +====================================================================${Color_Off}" +## HOST DETAILS +# SHOW +echo -e "${On_Green}= Host Informations${Color_Off}" +echo -e " Hostname : ${BGreen}$HOSTNAME${Color_Off}" +echo -e " Primary IP : ${BGreen}$(hostname -I | cut -d' ' -f1)$Color_Off" +echo -e " Time : ${BGreen}$(date)${Color_Off}" +echo -e " User : ${BGreen}$(whoami)${Color_Off}" +echo -e " UID/GID : ${BGreen}$UID${Color_Off}" +echo -e " HomeDir : ${BGreen}$HOME${Color_Off}" +echo -e " Language : ${BGreen}$LANG${Color_Off}" +echo -e "${On_Green}= ${Color_Off}" +###################### + +## BASE (UI) +prefix="Run |>" +errors="Error |>" +succes="Success |>" +compat="Compat |>" +askfor="Question |>" +###################### + +## ROOT MODE CHECK (SUDO MODE OR SU MODE) +if [ "$UID" -ne 0 ] +then +echo -e "${Red}$errors Root mode not detected (current UID : ${BRed}$UID${Red}). You must run this script as root or via sudo command. (we recommend running as root mode after sudo su -)${Color_Off}" +exit +fi +###################### + +if [[ -f "$osrel" ]]; then + echo -e "${BCyan}$compat${Color_Off} Fedora was detected." + echo -e "${BYellow}$prefix${Color_Off} Continue Execution." +else + echo -e "${BCyan}$compat${Color_Off} Another OS is active on this machine. Incompatibility identified." + echo -e "${BYellow}$prefix${Color_Off} Exiting." + exit +fi + +## RANDOM PIN +pincode=$(shuf -i 1000-9999 -n 1) +####################### + +## CONFIRMATION +echo -n -e "${BBlue}$askfor${Color_Off} Type this code to execute ($pincode) : " +read -r pinentered +if [[ "$pinentered" -ne "$pincode" ]] +then + echo -e "${BRed}$errors Pincode $pinentered received, there is an error here. Good Bye.${Color_Off}" + echo -e "${BRed}$errors Exiting...${Color_Off}" + exit +fi +echo -e "${BGreen}$succes Pincode $pinentered received, Accepted.${Color_Off}" +####################### +sleep 2 +clear +echo -e "${On_Blue}== Interactive Deployment Started - Welcome $(whoami) ==${Color_Off}" + +echo "defaultyes=True" >> /etc/dnf/dnf.conf +echo "color=never" >> /etc/dnf/dnf.conf + +## Updating System +echo -e "${BYellow}$prefix${Color_Off} DNF:Updating Packages..." +echo -e "$BPurple" +dnf up -y --refresh +echo -e "$Color_Off" +echo -e "$Color_Off" + +## Firewall Control +clear +echo -e "${On_Blue}== FirewallD Control ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Disable Firewall-D ? (Recommended to avoid issues, can be enabled again later)(Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + systemctl stop firewalld + systemctl disable firewalld + echo -e "${BYellow}$prefix${Color_Off} FirewallD is now stopped and disabled." + sleep 3 +else + echo -e "${BYellow}$prefix${Color_Off} FirewallD was ${BRed}not${Color_Off} disabled." + sleep 3 +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +clear +echo -e "${On_Blue}== Basic Package by Tyleo Dv. Delaware - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install Basic Package (Recommended, Include BTOP, HTOP and Glances) ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${On_Blue}== htop btop duf fish zsh git nano glances ==${Color_Off}" + echo -e "${BYellow}$prefix${Color_Off} Installing Base Packages (recommended by Tyleo)..." + echo -e "${BYellow}$prefix${Color_Off} DNF:Installing Packages..." + echo -e "$BPurple" + dnf in -y htop btop duf fish zsh git nano glances + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Glances..." + systemctl enable glances + systemctl start glances +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +clear +echo -e "${On_Blue}== Additionnal Packages - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install Additionnal Packages ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} Packages (separated by SPACES) :" + read -r pkgs + echo -e "$BPurple" + dnf up --refresh -y + dnf in $pkgs -y + echo -e "$Color_Off" +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +if [[ -f /usr/bin/cockpit-bridge ]]; then + clear + echo -e "${On_Blue}== Cockpit Admin Panel - Installation Processing ==${Color_Off}" + echo -n -e "${BBlue}$askfor${Color_Off} Install Cockpit [9090/https] ? (Y/n):" + read -r accept + if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "$BPurple" + dnf up --refresh -y + dnf in cockpit -y + echo -e "$Color_Off" + dnf in -y cockpit-navigator + dnf in -y https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm + echo -e "${Purple} [9090/https] Enabling Cockpit Services..." + systemctl enable cockpit.socket + systemctl enable cockpit + echo -e "${Purple} [9090/https] Starting Cockpit Services..." + systemctl start cockpit.socket + systemctl start cockpit + fi +accept="n" +fi + +clear +echo -e "${On_Blue}== Basic System Configuration ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Change Hostnames ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} New Pretty Hostname (spaces,maj) : " + read -r pHost + echo -n -e "${BBlue}$askfor${Color_Off} New Static Hostname (no-space,no-maj) : " + read -r sHost + echo -e "${Purple} Setting Hostname (Pretty)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$pHost" --pretty + echo -e "${Purple} Setting Hostname (Static)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$sHost" --static + sleep 3 +fi +accept="n" + +echo -n -e "${BBlue}$askfor${Color_Off} Create a Service Account ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} Username : " + read username + if [[ -f /usr/bin/fish ]]; then + useradd $username --shell /usr/bin/fish -G wheel -m -d /home/srv-$username -c "Service Account" -b /home/srv-$username + echo "$username ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/srv-$username + passwd $username + else + useradd $username --shell /usr/bin/bash -G wheel -m -d /home/srv-$username -c "Service Account" -b /home/srv-$username + echo "$username ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/srv-$username + passwd $username + fi + + sleep 3 +fi +accept="n" + +echo -n -e "${BBlue}$askfor${Color_Off} Change Local and SSHD MOTD (Cockpit/sshd) ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} MOTD - Description (no-return,spaces,maj) : " + read -r dMOTD + echo -e "${Purple} Setting MOTD to Local motd file (/etc/motd)${BGreen} [OK]${Color_Off}" + echo -e "$dMOTD" > /etc/motd + echo -e "${Purple} Setting MOTD to SSHD motd file (/etc/ssh-motd)${BGreen} [OK]${Color_Off}" + echo -e "$dMOTD" > /etc/ssh-motd + echo -e "${Purple} Setting SSHD Configuration to SSHD .d file (/etc/ssh/sshd_config.d/999-banner)${BGreen} [OK]${Color_Off}" + echo "Banner /etc/ssh-motd" > /etc/ssh/sshd_config.d/999-banner + chmod 0600 /etc/ssh/sshd_config.d/999-banner + chmod 0600 /etc/ssh-motd + systemctl restart sshd + sleep 3 +fi +accept="n" + +echo -n -e "${BBlue}$askfor${Color_Off} Change Timezone ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} Enter the Timezone (Zone/City) : " + read -r tzone + timedatectl set-timezone $tzone + echo -e "${Purple} Setting Timezone to $tzone${BGreen} [OK]${Color_Off}" + sleep 3 +fi +accept="n" + +## DOCKER +clear +echo -e "${On_Blue}== Docker Community Edition - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install Docker ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${BYellow}$prefix${Color_Off} DNF-CFG:Adding Docker CE Repo (Auto Rel)..." + dnf config-manager --add-repo=https://download.docker.com/linux/fedora/docker-ce.repo -y + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} DNF:Updating Index..." + echo -e "$BPurple" + dnf up -y --refresh + echo -e "$Color_Off" + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} DNF:Installing docker-ce..." + echo -e "$BPurple" + dnf in docker-ce -y + echo -e "$Color_Off" + wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop + chmod +x /usr/local/bin/ctop + wget http://s.tyleodev.fr/host-binary/lazydocker -O /usr/local/bin/lzd + chmod +x /usr/local/bin/lzd + curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /bin/docker-compose + chmod +x /bin/docker-compose + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Docker and Docker Socket..." + systemctl enable docker.socket + systemctl enable docker + systemctl start docker.socket + systemctl start docker + sleep 3 +fi +accept="n" + +## XRDP (RDS Mode, not recommended for Docker enabled host) +clear +echo -e "${On_Blue}== X-Server Remote Desktop Services - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install XRDP Server ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + dnf up -y + echo -e "$Color_Off" + echo -e "$BPurple" + dnf in xrdp -y + echo -e "$Color_Off" + firewall-cmd --permanent --add-port=3389/tcp + firewall-cmd --reload + chcon --type=bin_t /usr/sbin/xrdp + chcon --type=bin_t /usr/sbin/xrdp-sesman + systemctl enable xrdp + systemctl enable xrdp-sesman + systemctl start xrdp + systemctl start xrdp-sesman + sleep 3 +fi +accept="n" + +## GOOGLE CHROME // FOR RDS OR DESKTOP ONLY +chrome_rpm="https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm" +clear +echo -e "== ${BBlue}G${BRed}o${BYellow}o${BBlue}g${BGreen}l${BRed}e${Color_Off} Chrome - Installation Processing ==" +echo -n -e "${BBlue}$askfor${Color_Off} Install Google Chrome Browser ? (RDS or Desktop only !!)(Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + dnf up -y + echo -e "$Color_Off" + echo -e "$BPurple" + dnf in -y $chrome_rpm + echo -e "$Color_Off" + sleep 3 +fi + +# TERMINATED +clear +echo -e "${On_Green}== Script Finished - Reboot is Recommended ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Reboot Now ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Rebooting ...${Color_Off}" + sleep 1 + sudo reboot +fi +accept="n" diff --git a/irp-fedora-lxd b/irp-fedora-lxd new file mode 100755 index 0000000..643c952 --- /dev/null +++ b/irp-fedora-lxd @@ -0,0 +1,22 @@ +dnf up -y +dnf install 'dnf-command(config-manager)' -y +dnf config-manager --add-repo=https://download.docker.com/linux/fedora/docker-ce.repo -y +dnf in -y cockpit nano bash fish htop btop ncurses openssh-server rsync docker-ce +wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop +chmod +x /usr/local/bin/ctop +wget http://s.tyleodev.fr/host-binary/lazydocker -O /usr/local/bin/lzd +chmod +x /usr/local/bin/lzd +curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /bin/docker-compose +chmod +x /bin/docker-compose +echo > /etc/cockpit/disallowed-users +systemctl enable cockpit.socket +systemctl enable sshd +echo "PermitRootLogin yes" > /etc/ssh/sshd_config.d/10-lxc +echo "PermitRootLogin yes" >> /etc/ssh/sshd_config +systemctl start sshd +systemctl start cockpit.socket +systemctl enable docker.socket +systemctl enable docker +systemctl start docker.socket +systemctl start docker +usermod --shell /usr/bin/fish root \ No newline at end of file diff --git a/irp-icons b/irp-icons new file mode 100755 index 0000000..a686336 --- /dev/null +++ b/irp-icons @@ -0,0 +1 @@ +sudo apt install tango-icon-theme tangerine-icon-theme sugar-icon-theme sea-icon-theme oxygen-icon-theme obsidian-icon-theme moka-icon-theme moblin-icon-theme faba-icon-theme breeze-icon-theme -y \ No newline at end of file diff --git a/irp-kaisen b/irp-kaisen new file mode 100755 index 0000000..dbf17a9 --- /dev/null +++ b/irp-kaisen @@ -0,0 +1,107 @@ +#!/usr/bin/env bash + +if ! command -v dpkg &> /dev/null +then + echo "Systéme non DEB - Lancement annulé" + echo "Utilisez irp-rhel pour RPM." + echo "https://tyleodev.fr/scripts-crees-par-tyleo/" + exit +fi +echo ------------------------------------------------------------- +curl https://static.tyleodev.fr/astra/banner-all +echo Version 2.1 - Script de Déploiement Public pour Kaisen +echo "Conversion vers un usage Serveur (disable-services)..." +echo Nettoyage des services... +sudo /usr/share/kaisen-services-management/all-services-disable +sleep 2 +echo "Activation de [APP][OPS] Docker Daemon (dockerd et docker.socket)..." +sudo /usr/share/kaisen-services-management/docker-enable +sleep 2 +echo "Activation de [CLI][OPS] SSH Daemon (sshd et sshfs)..." +sudo /usr/share/kaisen-services-management/ssh-enable +sleep 2 +echo "Activation de [FS ][PERFORMANCE] BTRFS Degrag..." +sudo /usr/share/kaisen-services-management/btrfs-defrag-enable +sleep 2 +echo "Activation de [NET][SECURITY] ARP Watcher..." +sudo /usr/share/kaisen-services-management/arpwatch-enable +sleep 2 +echo "Activation de [NET][SECURITY] ARP Alert..." +sudo /usr/share/kaisen-services-management/arpalert-enable +sleep 2 +echo "Activation de [SYS][SNAPSHOTS] Snapper Daemon (snapperd)..." +sudo /usr/share/kaisen-services-management/snapperd-enable +sleep 2 +echo "Activation de [SYS][SCHEDULER] Chrony Daemon (chronyd)..." +sudo systemctl enable chrony +sudo systemctl start chrony + +wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb +sudo apt-get install ./duf_0.8.1_linux_amd64.deb +sudo apt-get update &>/dev/null +sudo apt-get install zsh git tuned davfs2 curl wget mc htop nethogs figlet nano docker.io docker-compose -y +sudo apt-get install netdata-web cockpit libvirt virt-manager -y +wget https://launchpad.net/ubuntu/+source/cockpit/215-1~ubuntu19.10.1/+build/18889196/+files/cockpit-docker_215-1~ubuntu19.10.1_all.deb +wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.deb +sudo apt-get install ./gotop_v4.1.4_linux_amd64.deb -y +sudo apt-get install ./cockpit-docker_215-1~ubuntu19.10.1_all.deb -y +sudo wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator_0.5.8-1focal_all.deb +sudo apt-get install ./cockpit-navigator_0.5.8-1focal_all.deb -y +echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER +sudo docker volume create portainer_data +sudo docker container stop portainer +sudo docker container rm portainer +sudo docker run -d -p 8000:8000 -p 10443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest +echo Reboot dans 25s +sleep 1 +echo Reboot dans 24s +sleep 1 +echo Reboot dans 23s +sleep 1 +echo Reboot dans 22s +sleep 1 +echo Reboot dans 21s +sleep 1 +echo Reboot dans 20s +sleep 1 +echo Reboot dans 19s +sleep 1 +echo Reboot dans 18s +sleep 1 +echo Reboot dans 17s +sleep 1 +echo Reboot dans 16s +sleep 1 +echo Reboot dans 15s +sleep 1 +echo Reboot dans 14s +sleep 1 +echo Reboot dans 13s +sleep 1 +echo Reboot dans 12s +sleep 1 +echo Reboot dans 11s +sleep 1 +echo Reboot dans 10s +sleep 1 +echo Reboot dans 9s +sleep 1 +echo Reboot dans 8s +sleep 1 +echo Reboot dans 7s +sleep 1 +echo Reboot dans 6s +sleep 1 +echo Reboot dans 5s +sleep 1 +echo Reboot dans 4s +sleep 1 +echo Reboot dans 3s +sleep 1 +echo Reboot dans 2s +sleep 1 +echo Reboot dans 1s +sleep 1 +echo Reboot dans 0s +sleep 1 +sudo reboot \ No newline at end of file diff --git a/irp-kuma b/irp-kuma new file mode 100755 index 0000000..5336dbb --- /dev/null +++ b/irp-kuma @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +sudo mkdir /store +sudo mkdir /store/supervision +echo " Uptime Kuma Instance Maker - Normal Node (no docker.sock connection) " +echo "" +echo -n "Instance Name (no space) : " +read instname +echo -n "Port (Random port is default) : " +read instport +docker volume create uptime-kuma-$instname +docker run -d --restart=always -p $instport:3001 -v /store/supervision/uptime-kuma-$instname:/app/data --name uptime-kuma-$instname louislam/uptime-kuma:latest diff --git a/irp-kumadocker b/irp-kumadocker new file mode 100755 index 0000000..001cb33 --- /dev/null +++ b/irp-kumadocker @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +sudo mkdir /store +sudo mkdir /store/supervision +echo " Uptime Kuma Instance Maker - Docker Node (direct docker.sock connection) " +echo "" +echo -n "Instance Name (no space) : " +read instname +echo -n "Port (Random port is default) : " +read instport +docker volume create uptime-kuma-$instname +docker run -d --restart=always -p $instport:3001 -v /store/supervision/uptime-kuma-$instname:/app/data -v /var/run/docker.sock:/var/run/docker.sock --name uptime-kuma-$instname louislam/uptime-kuma:latest diff --git a/irp-lazydocker b/irp-lazydocker new file mode 100755 index 0000000..bde933e --- /dev/null +++ b/irp-lazydocker @@ -0,0 +1,16 @@ +clear +curl https://static.tyleodev.fr/astra/banner-all +echo "---------------------------------------------------------" +echo "/> Installing LazyDocker (STD Edition)..." +sudo wget http://s.tyleodev.fr/host-binary/lazydocker -O /bin/lazydocker +sudo chmod +x /bin/lazydocker +echo "---------------------------------------------------------" +sleep 1 +clear +curl https://static.tyleodev.fr/astra/banner-all +echo "---------------------------------------------------------" +echo "-- Commande : lazydocker --" +echo "-- Emplacement : /bin/lazydocker --" +echo "-- Requis : docker (run), docker.socket (service) --" +echo "---------------------------------------------------------" +echo "/> Terminé." \ No newline at end of file diff --git a/irp-lzd b/irp-lzd new file mode 100755 index 0000000..5d2f8b1 --- /dev/null +++ b/irp-lzd @@ -0,0 +1,16 @@ +clear +curl https://static.tyleodev.fr/astra/banner-all +echo "---------------------------------------------------------" +echo "/> Installing LazyDocker (LZD Edition)..." +sudo wget http://s.tyleodev.fr/host-binary/lazydocker -O /bin/lzd +sudo chmod +x /bin/lzd +echo "---------------------------------------------------------" +sleep 1 +clear +curl https://static.tyleodev.fr/astra/banner-all +echo "---------------------------------------------------------" +echo "-- Commande : lzd --" +echo "-- Emplacement : /bin/lzd --" +echo "-- Requis : docker (run), docker.socket (service) --" +echo "---------------------------------------------------------" +echo "/> Terminé." \ No newline at end of file diff --git a/irp-mineos b/irp-mineos new file mode 100755 index 0000000..2363b57 --- /dev/null +++ b/irp-mineos @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# MineOS Installer Script (default mode) + +if ! command -v dpkg &> /dev/null +then + echo "Systéme non DEB - Lancement annulé" + echo "Ce script ne fonctionne correctement" + echo "que sur Debian 11 et Ubuntu 20+" + echo "https://tyleodev.fr/scripts-crees-par-tyleo/" + exit +fi +echo ------------------------------------------------------------- +curl https://static.tyleodev.fr/astra/banner-deb +echo Version 2.1 - Script de Déploiement MineOS pour Debian + +apt -y install curl +curl -sL https://deb.nodesource.com/setup_14.x | bash - +apt -y install nodejs +wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_linux_hotspot_16.0.1_9.tar.gz -O openjdk-16-jre.tgz +tar xf openjdk-16-jre.tgz +mv jdk-16.0.* /opt/openjdk-16.0-jre +ln -s /opt/openjdk-16.0-jre/bin/java /usr/bin/java +rm openjdk-16-jre.tgz +apt -y install git rdiff-backup screen +apt -y install build-essential +cd /usr/games +git clone https://github.com/hexparrot/mineos-node minecraft +cd minecraft +git config core.filemode false +chmod +x generate-sslcert.sh mineos_console.js webui.js +cp mineos.conf /etc/mineos.conf +cd /usr/games/minecraft +npm install +cd /usr/games/minecraft +./generate-sslcert.sh +cp /usr/games/minecraft/init/systemd_conf /etc/systemd/system/mineos.service +systemctl enable mineos +apt install -y supervisord +cp /usr/games/minecraft/init/supervisor_conf /etc/supervisor/conf.d/mineos.conf +supervisorctl reload \ No newline at end of file diff --git a/irp-nala b/irp-nala new file mode 100755 index 0000000..9ca5885 --- /dev/null +++ b/irp-nala @@ -0,0 +1,7 @@ +wget https://gitlab.com/volian/volian-archive/uploads/b20bd8237a9b20f5a82f461ed0704ad4/volian-archive-keyring_0.1.0_all.deb +wget https://gitlab.com/volian/volian-archive/uploads/4ba4a75e391aa36f0cbe7fb59685eda9/volian-archive-scar_0.1.0_all.deb +sudo apt install ./volian-archive-keyring_0.1.0_all.deb +sudo apt install ./volian-archive-scar_0.1.0_all.deb +apt update +apt install nala -y +nala fetch \ No newline at end of file diff --git a/irp-nala-legacy b/irp-nala-legacy new file mode 100755 index 0000000..1ded211 --- /dev/null +++ b/irp-nala-legacy @@ -0,0 +1,5 @@ +wget -qO- https://deb.volian.org/volian/scar.key | gpg --dearmor | dd of=/usr/share/keyrings/volian-archive-scar.gpg +echo "deb [signed-by=/usr/share/keyrings/volian-archive-scar.gpg arch=amd64] https://deb.volian.org/volian/ scar main" > /etc/apt/sources.list.d/volian-archive-scar.list +apt update +apt install nala-legacy +nala fetch \ No newline at end of file diff --git a/irp-os-auto b/irp-os-auto new file mode 100755 index 0000000..9322ed1 --- /dev/null +++ b/irp-os-auto @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +clear + + +## FEDORA BASEOS FILES +osrel="/usr/bin/zypper" +###################### + +## COLORS +# Reset +Color_Off='\033[0m' # Text Reset + +# Regular Colors +Black='\033[0;30m' # Black +Red='\033[0;31m' # Red +Green='\033[0;32m' # Green +Yellow='\033[0;33m' # Yellow +Blue='\033[0;34m' # Blue +Purple='\033[0;35m' # Purple +Cyan='\033[0;36m' # Cyan +White='\033[0;37m' # White + +# Bold +BBlack='\033[1;30m' # Black +BRed='\033[1;31m' # Red +BGreen='\033[1;32m' # Green +BYellow='\033[1;33m' # Yellow +BBlue='\033[1;34m' # Blue +BPurple='\033[1;35m' # Purple +BCyan='\033[1;36m' # Cyan +BWhite='\033[1;37m' # White + +# Underline +UBlack='\033[4;30m' # Black +URed='\033[4;31m' # Red +UGreen='\033[4;32m' # Green +UYellow='\033[4;33m' # Yellow +UBlue='\033[4;34m' # Blue +UPurple='\033[4;35m' # Purple +UCyan='\033[4;36m' # Cyan +UWhite='\033[4;37m' # White + +# Background +On_Black='\033[40m' # Black +On_Red='\033[41m' # Red +On_Green='\033[42m' # Green +On_Yellow='\033[43m' # Yellow +On_Blue='\033[44m' # Blue +On_Purple='\033[45m' # Purple +On_Cyan='\033[46m' # Cyan +On_White='\033[47m' # White + +# High Intensity +IBlack='\033[0;90m' # Black +IRed='\033[0;91m' # Red +IGreen='\033[0;92m' # Green +IYellow='\033[0;93m' # Yellow +IBlue='\033[0;94m' # Blue +IPurple='\033[0;95m' # Purple +ICyan='\033[0;96m' # Cyan +IWhite='\033[0;97m' # White + +# Bold High Intensity +BIBlack='\033[1;90m' # Black +BIRed='\033[1;91m' # Red +BIGreen='\033[1;92m' # Green +BIYellow='\033[1;93m' # Yellow +BIBlue='\033[1;94m' # Blue +BIPurple='\033[1;95m' # Purple +BICyan='\033[1;96m' # Cyan +BIWhite='\033[1;97m' # White + +# High Intensity backgrounds +On_IBlack='\033[0;100m' # Black +On_IRed='\033[0;101m' # Red +On_IGreen='\033[0;102m' # Green +On_IYellow='\033[0;103m' # Yellow +On_IBlue='\033[0;104m' # Blue +On_IPurple='\033[0;105m' # Purple +On_ICyan='\033[0;106m' # Cyan +On_IWhite='\033[0;107m' # White +###################### + + +## HEADER +echo -e "${On_Green}==================================================================== +==== Tyleo Next Generation Script - Fedora Interactive Deployer ==== +====================================================================${Color_Off}" +## HOST DETAILS +# SHOW +echo -e "${On_Green}= Host Informations${Color_Off}" +echo -e " Hostname : ${BGreen}$HOSTNAME${Color_Off}" +echo -e " Primary IP : ${BGreen}$(hostname -I | cut -d' ' -f1)$Color_Off" +echo -e " Time : ${BGreen}$(date)${Color_Off}" +echo -e " User : ${BGreen}$(whoami)${Color_Off}" +echo -e " UID/GID : ${BGreen}$UID${Color_Off}" +echo -e " HomeDir : ${BGreen}$HOME${Color_Off}" +echo -e " Language : ${BGreen}$LANG${Color_Off}" +echo -e "${On_Green}= ${Color_Off}" +###################### + +## BASE (UI) +prefix="Run |>" +errors="Error |>" +succes="Success |>" +compat="Compat |>" +askfor="Question |>" +###################### + +if [[ -f "$osrel" ]]; then + echo -e "${BCyan}$compat${Color_Off} OpenSUSE or Zypper Based OS was detected." + echo -e "${BYellow}$prefix${Color_Off} Continue Execution." +else + echo -e "${BCyan}$compat${Color_Off} Another OS is active on this machine. Incompatibility identified." + echo -e "${BYellow}$prefix${Color_Off} Exiting." + exit +fi + +## RANDOM PIN +pincode=$(shuf -i 1000-9999 -n 1) +####################### + +## CONFIRMATION +echo -n -e "${BBlue}$askfor${Color_Off} Type this code to execute ($pincode) : " +read -r pinentered +if [[ "$pinentered" -ne "$pincode" ]] +then + echo -e "${BRed}$errors Pincode $pinentered received, there is an error here. Good Bye.${Color_Off}" + echo -e "${BRed}$errors Exiting...${Color_Off}" + exit +fi +echo -e "${BGreen}$succes Pincode $pinentered received, Accepted.${Color_Off}" +####################### +sleep 2 +clear +echo -e "${On_Blue}== Interactive Deployment Started - OpenSUSE Edition - Welcome $(whoami) ==${Color_Off}" + +## Updating System +echo -e "${BYellow}$prefix${Color_Off} ZyPP:Updating Packages..." +echo -e "$BPurple" +zypper up -y --refresh +echo -e "$Color_Off" +echo -e "$Color_Off" + +## Specific Fixes +zypper rm -y xscreensaver + +## Firewall Control +clear +echo -e "${On_Blue}== FirewallD Control ==${Color_Off}" +accept="Y" +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + systemctl stop firewalld + systemctl disable firewalld + echo -e "${BYellow}$prefix${Color_Off} FirewallD is now stopped and disabled." + sleep 3 +else + echo -e "${BYellow}$prefix${Color_Off} FirewallD was ${BRed}not${Color_Off} disabled." + sleep 3 +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +clear +echo -e "${On_Blue}== Basic Package by Tyleo Dv. Delaware - Installation Processing ==${Color_Off}" +accept="Y" +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${On_Blue}== htop btop duf fish zsh git nano glances terminator ncdu ==${Color_Off}" + echo -e "${BYellow}$prefix${Color_Off} Installing Base Packages (recommended by Tyleo)..." + echo -e "${BYellow}$prefix${Color_Off} ZyPP:Installing Packages..." + echo -e "$BPurple" + zypper in -y htop btop duf fish zsh git nano glances terminator ncdu icewm-themes + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Glances..." + systemctl enable glances + systemctl start glances + clear + echo -e "${On_Blue}== YaST Everything ==${Color_Off}" + sudo zypper in -y yast2-adcommon-python yast2-add-on yast2-adsi yast2-aduc yast2-alternatives yast2-apparmor yast2-audit-laf yast2-auth-client yast2-auth-server yast2-boot-server yast2-bootloader yast2-buildtools yast2-caasp yast2-cluster yast2-configuration-management yast2-control-center yast2-control-center-qt yast2-core yast2-core-devel yast2-country yast2-country-data yast2-devtools yast2-dns-manager yast2-drbd yast2-fcoe-client yast2-firewall yast2-firstboot yast2-firstboot-wsl yast2-ftp-server yast2-geo-cluster yast2-gpmc yast2-hardware-detection yast2-installation yast2-installation-control yast2-instserver yast2-iplb yast2-iscsi-client yast2-iscsi-lio-server yast2-isns yast2-journal yast2-kdump yast2-ldap yast2-logs yast2-mail yast2-metapackage-handler yast2-multipath yast2-network yast2-nfs-client yast2-nfs-common yast2-nfs-server yast2-ntp-client yast2-online-update yast2-online-update-configuration yast2-online-update-frontend yast2-packager yast2-pam yast2-perl-bindings yast2-pkg-bindings yast2-printer yast2-proxy yast2-python3-bindings yast2-qt-branding-openSUSE yast2-rdp yast2-rear yast2-rmt yast2-ruby-bindings yast2-samba-client yast2-samba-provision yast2-samba-server yast2-scanner yast2-schema-collection yast2-schema-default yast2-security yast2-services-manager yast2-slp yast2-slp-server yast2-snapper yast2-squid yast2-storage-ng yast2-sudo yast2-support yast2-sysconfig yast2-testsuite yast2-tftp-server yast2-theme yast2-theme-breeze yast2-theme-oxygen yast2-trans yast2-trans-af yast2-trans-allpacks yast2-trans-ar yast2-trans-ast yast2-trans-bg yast2-trans-bn yast2-trans-bs yast2-trans-ca yast2-trans-cs yast2-trans-cy yast2-trans-da yast2-trans-de yast2-trans-el yast2-trans-en_GB yast2-trans-eo yast2-trans-es yast2-trans-es_AR yast2-trans-et yast2-trans-eu yast2-trans-fa yast2-trans-fi yast2-trans-fr yast2-trans-gl yast2-trans-gu yast2-trans-he yast2-trans-hi yast2-trans-hr yast2-trans-hu yast2-trans-id yast2-trans-it yast2-trans-ja yast2-trans-jv yast2-trans-ka yast2-trans-kab yast2-trans-km yast2-trans-kn yast2-trans-ko yast2-trans-ku yast2-trans-lo yast2-trans-lt yast2-trans-lv yast2-trans-mk yast2-trans-mr yast2-trans-nb yast2-trans-nds yast2-trans-ne yast2-trans-nl yast2-trans-nn yast2-trans-pa yast2-trans-pl yast2-trans-ps yast2-trans-pt yast2-trans-pt_BR yast2-trans-ro yast2-trans-ru yast2-trans-si yast2-trans-sk yast2-trans-sl yast2-trans-sq yast2-trans-sr yast2-trans-sr-latin yast2-trans-stats yast2-trans-sv yast2-trans-sw yast2-trans-ta yast2-trans-tg yast2-trans-th yast2-trans-tr yast2-trans-uk yast2-trans-vi yast2-trans-wa yast2-trans-xh yast2-trans-zh_CN yast2-trans-zh_TW yast2-trans-zu yast2-transfer yast2-tune yast2-update yast2-usbauth yast2-users yast2-vm yast2-vpn yast2-widget-demo yast2-x11 yast2-xml yast2-ycp-ui-bindings yast2-ycp-ui-bindings-devel +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +clear +echo -e "${On_Blue}== Cockpit Admin Panel - Installation Processing ==${Color_Off}" +accept="Y" +if [[ $accept = Y ]] || [[ $accept = y ]] ; then +echo -e "$BPurple" +zypper ref +zypper up +zypper in -y cockpit +zypper in -y https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm +echo -e "$Color_Off" +echo -e "${Purple} [9090/https] Enabling Now Cockpit Services..." +systemctl enable --now cockpit.socket cockpit +accept="n" +fi + +clear +echo -e "${On_Blue}== Basic System Configuration ==${Color_Off}" +accept="Y" +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} New Pretty Hostname (spaces,maj) : " + read -r pHost + echo -n -e "${BBlue}$askfor${Color_Off} New Static Hostname (no-space,no-maj) : " + read -r sHost + echo -e "${Purple} Setting Hostname (Pretty)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$pHost" --pretty + echo -e "${Purple} Setting Hostname (Static)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$sHost" --static + sleep 3 +fi +accept="n" + +## DOCKER +clear +echo -e "${On_Blue}== Docker - Installation Processing ==${Color_Off}" +accept="Y" +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${BYellow}$prefix${Color_Off} ZyPP:Updating Index..." + echo -e "$BPurple" + zypper ref + zypper up -y + echo -e "$Color_Off" + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} ZyPP:Installing docker-ce with YaST Module..." + echo -e "$BPurple" + zypper in -y docker docker-compose ctop yast2-docker + echo -e "$Color_Off" + wget http://s.tyleodev.fr/host-binary/lazydocker -O /usr/local/bin/lzd + chmod +x /usr/local/bin/lzd + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Docker and Docker Socket..." + systemctl enable docker.socket --now + sleep 3 +fi +accept="n" + +## XRDP (RDS Mode, not recommended for Docker enabled host) +clear +echo -e "${On_Blue}== X-Server Remote Desktop Services - Installation Processing ==${Color_Off}" +accept="Y" +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + zypper up -y + echo -e "$Color_Off" + echo -e "$BPurple" + zypper in -y xrdp + echo -e "$Color_Off" + firewall-cmd --permanent --add-port=3389/tcp + firewall-cmd --reload + systemctl enable xrdp xrdp-sesman --now + sleep 3 +fi +accept="n" + +# TERMINATED +clear +echo -e "${On_Green}== Script Finished - Reboot is Recommended ==${Color_Off}" +accept="Y" +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Rebooting ...${Color_Off}" + sleep 1 + sudo reboot +fi +accept="n" \ No newline at end of file diff --git a/irp-os-base b/irp-os-base new file mode 100755 index 0000000..1f3303a --- /dev/null +++ b/irp-os-base @@ -0,0 +1,287 @@ +#!/usr/bin/env bash +clear + + +## FEDORA BASEOS FILES +osrel="/usr/bin/zypper" +###################### + +## COLORS +# Reset +Color_Off='\033[0m' # Text Reset + +# Regular Colors +Black='\033[0;30m' # Black +Red='\033[0;31m' # Red +Green='\033[0;32m' # Green +Yellow='\033[0;33m' # Yellow +Blue='\033[0;34m' # Blue +Purple='\033[0;35m' # Purple +Cyan='\033[0;36m' # Cyan +White='\033[0;37m' # White + +# Bold +BBlack='\033[1;30m' # Black +BRed='\033[1;31m' # Red +BGreen='\033[1;32m' # Green +BYellow='\033[1;33m' # Yellow +BBlue='\033[1;34m' # Blue +BPurple='\033[1;35m' # Purple +BCyan='\033[1;36m' # Cyan +BWhite='\033[1;37m' # White + +# Underline +UBlack='\033[4;30m' # Black +URed='\033[4;31m' # Red +UGreen='\033[4;32m' # Green +UYellow='\033[4;33m' # Yellow +UBlue='\033[4;34m' # Blue +UPurple='\033[4;35m' # Purple +UCyan='\033[4;36m' # Cyan +UWhite='\033[4;37m' # White + +# Background +On_Black='\033[40m' # Black +On_Red='\033[41m' # Red +On_Green='\033[42m' # Green +On_Yellow='\033[43m' # Yellow +On_Blue='\033[44m' # Blue +On_Purple='\033[45m' # Purple +On_Cyan='\033[46m' # Cyan +On_White='\033[47m' # White + +# High Intensity +IBlack='\033[0;90m' # Black +IRed='\033[0;91m' # Red +IGreen='\033[0;92m' # Green +IYellow='\033[0;93m' # Yellow +IBlue='\033[0;94m' # Blue +IPurple='\033[0;95m' # Purple +ICyan='\033[0;96m' # Cyan +IWhite='\033[0;97m' # White + +# Bold High Intensity +BIBlack='\033[1;90m' # Black +BIRed='\033[1;91m' # Red +BIGreen='\033[1;92m' # Green +BIYellow='\033[1;93m' # Yellow +BIBlue='\033[1;94m' # Blue +BIPurple='\033[1;95m' # Purple +BICyan='\033[1;96m' # Cyan +BIWhite='\033[1;97m' # White + +# High Intensity backgrounds +On_IBlack='\033[0;100m' # Black +On_IRed='\033[0;101m' # Red +On_IGreen='\033[0;102m' # Green +On_IYellow='\033[0;103m' # Yellow +On_IBlue='\033[0;104m' # Blue +On_IPurple='\033[0;105m' # Purple +On_ICyan='\033[0;106m' # Cyan +On_IWhite='\033[0;107m' # White +###################### + + +## HEADER +echo -e "${On_Green}==================================================================== +==== Tyleo Next Generation Script - Fedora Interactive Deployer ==== +====================================================================${Color_Off}" +## HOST DETAILS +# SHOW +echo -e "${On_Green}= Host Informations${Color_Off}" +echo -e " Hostname : ${BGreen}$HOSTNAME${Color_Off}" +echo -e " Primary IP : ${BGreen}$(hostname -I | cut -d' ' -f1)$Color_Off" +echo -e " Time : ${BGreen}$(date)${Color_Off}" +echo -e " User : ${BGreen}$(whoami)${Color_Off}" +echo -e " UID/GID : ${BGreen}$UID${Color_Off}" +echo -e " HomeDir : ${BGreen}$HOME${Color_Off}" +echo -e " Language : ${BGreen}$LANG${Color_Off}" +echo -e "${On_Green}= ${Color_Off}" +###################### + +## BASE (UI) +prefix="Run |>" +errors="Error |>" +succes="Success |>" +compat="Compat |>" +askfor="Question |>" +###################### + +if [[ -f "$osrel" ]]; then + echo -e "${BCyan}$compat${Color_Off} OpenSUSE or Zypper Based OS was detected." + echo -e "${BYellow}$prefix${Color_Off} Continue Execution." +else + echo -e "${BCyan}$compat${Color_Off} Another OS is active on this machine. Incompatibility identified." + echo -e "${BYellow}$prefix${Color_Off} Exiting." + exit +fi + +## RANDOM PIN +pincode=$(shuf -i 1000-9999 -n 1) +####################### + +## CONFIRMATION +echo -n -e "${BBlue}$askfor${Color_Off} Type this code to execute ($pincode) : " +read -r pinentered +if [[ "$pinentered" -ne "$pincode" ]] +then + echo -e "${BRed}$errors Pincode $pinentered received, there is an error here. Good Bye.${Color_Off}" + echo -e "${BRed}$errors Exiting...${Color_Off}" + exit +fi +echo -e "${BGreen}$succes Pincode $pinentered received, Accepted.${Color_Off}" +####################### +sleep 2 +clear +echo -e "${On_Blue}== Interactive Deployment Started - OpenSUSE Edition - Welcome $(whoami) ==${Color_Off}" + +## Updating System +echo -e "${BYellow}$prefix${Color_Off} ZyPP:Updating Packages..." +echo -e "$BPurple" +zypper up -y --refresh +echo -e "$Color_Off" +echo -e "$Color_Off" + +## Specific Fixes +zypper rm -y xscreensaver + +## Firewall Control +clear +echo -e "${On_Blue}== FirewallD Control ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Disable Firewall-D ? (Recommended to avoid issues, can be enabled again later)(Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + systemctl stop firewalld + systemctl disable firewalld + echo -e "${BYellow}$prefix${Color_Off} FirewallD is now stopped and disabled." + sleep 3 +else + echo -e "${BYellow}$prefix${Color_Off} FirewallD was ${BRed}not${Color_Off} disabled." + sleep 3 +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +clear +echo -e "${On_Blue}== Basic Package by Tyleo Dv. Delaware - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install Basic Package (Recommended, Include BTOP, HTOP, Glances, Terminator and NCDU) ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${On_Blue}== htop btop duf fish zsh git nano glances terminator ncdu ==${Color_Off}" + echo -e "${BYellow}$prefix${Color_Off} Installing Base Packages (recommended by Tyleo)..." + echo -e "${BYellow}$prefix${Color_Off} ZyPP:Installing Packages..." + echo -e "$BPurple" + zypper in -y htop btop duf fish zsh git nano glances terminator ncdu icewm-themes + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Glances..." + systemctl enable glances + systemctl start glances + clear + echo -e "${On_Blue}== YaST Everything ==${Color_Off}" + sudo zypper in -y yast2-adcommon-python yast2-add-on yast2-adsi yast2-aduc yast2-alternatives yast2-apparmor yast2-audit-laf yast2-auth-client yast2-auth-server yast2-boot-server yast2-bootloader yast2-buildtools yast2-caasp yast2-cluster yast2-configuration-management yast2-control-center yast2-control-center-qt yast2-core yast2-core-devel yast2-country yast2-country-data yast2-devtools yast2-dns-manager yast2-drbd yast2-fcoe-client yast2-firewall yast2-firstboot yast2-firstboot-wsl yast2-ftp-server yast2-geo-cluster yast2-gpmc yast2-hardware-detection yast2-installation yast2-installation-control yast2-instserver yast2-iplb yast2-iscsi-client yast2-iscsi-lio-server yast2-isns yast2-journal yast2-kdump yast2-ldap yast2-logs yast2-mail yast2-metapackage-handler yast2-multipath yast2-network yast2-nfs-client yast2-nfs-common yast2-nfs-server yast2-ntp-client yast2-online-update yast2-online-update-configuration yast2-online-update-frontend yast2-packager yast2-pam yast2-perl-bindings yast2-pkg-bindings yast2-printer yast2-proxy yast2-python3-bindings yast2-qt-branding-openSUSE yast2-rdp yast2-rear yast2-rmt yast2-ruby-bindings yast2-samba-client yast2-samba-provision yast2-samba-server yast2-scanner yast2-schema-collection yast2-schema-default yast2-security yast2-services-manager yast2-slp yast2-slp-server yast2-snapper yast2-squid yast2-storage-ng yast2-sudo yast2-support yast2-sysconfig yast2-testsuite yast2-tftp-server yast2-theme yast2-theme-breeze yast2-theme-oxygen yast2-trans yast2-trans-af yast2-trans-allpacks yast2-trans-ar yast2-trans-ast yast2-trans-bg yast2-trans-bn yast2-trans-bs yast2-trans-ca yast2-trans-cs yast2-trans-cy yast2-trans-da yast2-trans-de yast2-trans-el yast2-trans-en_GB yast2-trans-eo yast2-trans-es yast2-trans-es_AR yast2-trans-et yast2-trans-eu yast2-trans-fa yast2-trans-fi yast2-trans-fr yast2-trans-gl yast2-trans-gu yast2-trans-he yast2-trans-hi yast2-trans-hr yast2-trans-hu yast2-trans-id yast2-trans-it yast2-trans-ja yast2-trans-jv yast2-trans-ka yast2-trans-kab yast2-trans-km yast2-trans-kn yast2-trans-ko yast2-trans-ku yast2-trans-lo yast2-trans-lt yast2-trans-lv yast2-trans-mk yast2-trans-mr yast2-trans-nb yast2-trans-nds yast2-trans-ne yast2-trans-nl yast2-trans-nn yast2-trans-pa yast2-trans-pl yast2-trans-ps yast2-trans-pt yast2-trans-pt_BR yast2-trans-ro yast2-trans-ru yast2-trans-si yast2-trans-sk yast2-trans-sl yast2-trans-sq yast2-trans-sr yast2-trans-sr-latin yast2-trans-stats yast2-trans-sv yast2-trans-sw yast2-trans-ta yast2-trans-tg yast2-trans-th yast2-trans-tr yast2-trans-uk yast2-trans-vi yast2-trans-wa yast2-trans-xh yast2-trans-zh_CN yast2-trans-zh_TW yast2-trans-zu yast2-transfer yast2-tune yast2-update yast2-usbauth yast2-users yast2-vm yast2-vpn yast2-widget-demo yast2-x11 yast2-xml yast2-ycp-ui-bindings yast2-ycp-ui-bindings-devel +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +clear +echo -e "${On_Blue}== Additionnal Packages - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install Additionnal Packages ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} Packages (separated by SPACES) :" + read -r pkgs + echo -e "$BPurple" + zypper ref + zypper up + zypper in -y $pkgs + echo -e "$Color_Off" +fi +accept="n" + +## BASIC PACKAGES BY TYLEO (With auto mode) +clear +echo -e "${On_Blue}== Cockpit Admin Panel - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install Cockpit [9090/https] ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then +echo -e "$BPurple" +zypper ref +zypper up +zypper in -y cockpit +zypper in -y https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm +echo -e "$Color_Off" +echo -e "${Purple} [9090/https] Enabling Now Cockpit Services..." +systemctl enable --now cockpit.socket cockpit +accept="n" +fi + +clear +echo -e "${On_Blue}== Basic System Configuration ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Change Hostnames ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} New Pretty Hostname (spaces,maj) : " + read -r pHost + echo -n -e "${BBlue}$askfor${Color_Off} New Static Hostname (no-space,no-maj) : " + read -r sHost + echo -e "${Purple} Setting Hostname (Pretty)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$pHost" --pretty + echo -e "${Purple} Setting Hostname (Static)${BGreen} [OK]${Color_Off}" + hostnamectl set-hostname "$sHost" --static + sleep 3 +fi +accept="n" + +## DOCKER +clear +echo -e "${On_Blue}== Docker - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install Docker ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${BYellow}$prefix${Color_Off} ZyPP:Updating Index..." + echo -e "$BPurple" + zypper ref + zypper up -y + echo -e "$Color_Off" + echo -e "$Color_Off" + echo -e "${BYellow}$prefix${Color_Off} ZyPP:Installing docker-ce with YaST Module..." + echo -e "$BPurple" + zypper in -y docker docker-compose ctop yast2-docker + echo -e "$Color_Off" + wget http://s.tyleodev.fr/host-binary/lazydocker -O /usr/local/bin/lzd + chmod +x /usr/local/bin/lzd + echo -e "${BYellow}$prefix${Color_Off} SYS:Enabling Docker and Docker Socket..." + systemctl enable docker.socket --now + sleep 3 +fi +accept="n" + +## XRDP (RDS Mode, not recommended for Docker enabled host) +clear +echo -e "${On_Blue}== X-Server Remote Desktop Services - Installation Processing ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Install XRDP Server ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + zypper up -y + echo -e "$Color_Off" + echo -e "$BPurple" + zypper in -y xrdp + echo -e "$Color_Off" + firewall-cmd --permanent --add-port=3389/tcp + firewall-cmd --reload + systemctl enable xrdp xrdp-sesman --now + sleep 3 +fi +accept="n" + +# TERMINATED +clear +echo -e "${On_Green}== Script Finished - Reboot is Recommended ==${Color_Off}" +echo -n -e "${BBlue}$askfor${Color_Off} Reboot Now ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -e "${BPurple}${BYellow}$prefix${Color_Off} Rebooting ...${Color_Off}" + sleep 1 + sudo reboot +fi +accept="n" \ No newline at end of file diff --git a/irp-os-kvm b/irp-os-kvm new file mode 100755 index 0000000..743f08d --- /dev/null +++ b/irp-os-kvm @@ -0,0 +1,2 @@ +sudo systemctl enable --now virtnetworkd.socket virtinterfaced-admin.socket virtproxyd.socket virtsecretd.socket virtstoraged.socket virtqemud.socket virtnodedevd.socket virtlogd.socket virtlockd.socket +sudo systemctl start virtnetworkd.socket virtinterfaced-admin.socket virtproxyd.socket virtsecretd.socket virtstoraged.socket virtqemud.socket virtnodedevd.socket virtlogd.socket virtlockd.socket \ No newline at end of file diff --git a/irp-ozh b/irp-ozh new file mode 100755 index 0000000..7ffdaaa --- /dev/null +++ b/irp-ozh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +curl https://static.tyleodev.fr/astra/banner-all +echo Complément Oh-My-ZSH - Git est nécessaire. +echo Faire exit quand oh my zsh est lancé pour terminer. +echo ---------------------------------------------------- +echo Lancement en User level. Sudo sera demandé en 2eme. +echo UID : $UID / $USER +if [[ $UID = 0 ]]; then + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +else + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +fi \ No newline at end of file diff --git a/irp-pbs b/irp-pbs new file mode 100755 index 0000000..5730a62 --- /dev/null +++ b/irp-pbs @@ -0,0 +1,30 @@ +clear +echo =============================================================== +echo ===== Proxmox BS - Preparation Script - Tyleo Innovations ===== +echo =============================================================== +echo ================= Make IT Happening, Again. =================== +echo =============================================================== + +echo Removing PBS 3.0 Sub Repo... +rm -f /etc/apt/sources.list.d/* +mv /etc/apt/sources.list /etc/apt/sources.list.pbsdisabled +echo Adding Debian Bookworm 12 Original Repos... +echo deb http://deb.debian.org/debian bookworm main > /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bookworm main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian-security/ bookworm-security main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian-security/ bookworm-security main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian bookworm-updates main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bookworm-updates main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian bookworm-backports main contrib non-free >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free >> /etc/apt/sources.list +echo deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription >> /etc/apt/sources.list +apt update +apt install htop fish nala -y +nala update +nala upgrade -y +sleep 2 +wget https://s.tyleodev.fr/setup/runner/run-pbs-patch -O /bin/pbspatch +chmod +x /bin/pbspatch +echo 'Make a Cron to execute /bin/pvepatch to autoremove Sub Message (Recommended Cron below !, /bin/pbspatch is already Executable and must be run as root.)' +echo '15 0 * * * /bin/pbspatch' +echo Terminated. diff --git a/irp-pbs-trixie b/irp-pbs-trixie new file mode 100644 index 0000000..403b31f --- /dev/null +++ b/irp-pbs-trixie @@ -0,0 +1,30 @@ +clear +echo =============================================================== +echo ===== Proxmox BS - Preparation Script - Tyleo Innovations ===== +echo =============================================================== +echo ================= Make IT Happening, Again. =================== +echo =============================================================== + +echo Removing PBS 3.0 Sub Repo... +rm -f /etc/apt/sources.list.d/* +mv /etc/apt/sources.list /etc/apt/sources.list.pbsdisabled +echo Adding Debian trixie 13 Original Repos... +echo deb http://deb.debian.org/debian trixie main > /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian trixie main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian-security/ trixie-security main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian-security/ trixie-security main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian trixie-updates main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian trixie-updates main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian trixie-backports main contrib non-free >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian trixie-backports main contrib non-free >> /etc/apt/sources.list +echo deb http://download.proxmox.com/debian/pbs bookworm pbs-no-subscription >> /etc/apt/sources.list +apt update +apt install htop fish nala -y +nala update +nala upgrade -y +sleep 2 +wget https://s.tyleodev.fr/setup/runner/run-pbs-patch -O /bin/pbspatch +chmod +x /bin/pbspatch +echo 'Make a Cron to execute /bin/pvepatch to autoremove Sub Message (Recommended Cron below !, /bin/pbspatch is already Executable and must be run as root.)' +echo '15 0 * * * /bin/pbspatch' +echo Terminated. diff --git a/irp-pmx b/irp-pmx new file mode 100755 index 0000000..bb8cab2 --- /dev/null +++ b/irp-pmx @@ -0,0 +1,17 @@ +echo Removing PVE Sub Repo... +rm -f /etc/apt/sources.list.d/* +mv /etc/apt/sources.list /etc/apt/sources.list.pvedisabled +echo Adding Debian Bullseye Original Repos... +echo deb http://deb.debian.org/debian bullseye main > /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bullseye main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian-security/ bullseye-security main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian-security/ bullseye-security main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian bullseye-updates main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bullseye-updates main >> /etc/apt/sources.list +echo deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription >> /etc/apt/sources.list +apt update +apt upgrade -y +apt install htop fish -y +sleep 2 +echo Subscription Killing... +sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service \ No newline at end of file diff --git a/irp-pmx-upgrade7to8 b/irp-pmx-upgrade7to8 new file mode 100755 index 0000000..db14a11 --- /dev/null +++ b/irp-pmx-upgrade7to8 @@ -0,0 +1,20 @@ + +# Checking +clear +pve7to8 --full +echo CTRL+C to cancel Upgrade Operation - 7to8_Deb11toDeb12 +sleep 30 + +# Operating +clear +echo Processing... +apt update +apt upgrade -y +sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list +apt update +apt dist-upgrade -y + +# Reboot +echo Reboot in 5 seconds... +sleep 5 +reboot \ No newline at end of file diff --git a/irp-pmx8.0 b/irp-pmx8.0 new file mode 100755 index 0000000..044bb44 --- /dev/null +++ b/irp-pmx8.0 @@ -0,0 +1,32 @@ +clear +echo =============================================================== +echo ===== Proxmox VE - Preparation Script - Tyleo Innovations ===== +echo =============================================================== +echo ================= Make IT Happening, Again. =================== +echo =============================================================== + +echo Removing PVE 8.0 Sub Repo... +rm -f /etc/apt/sources.list.d/pve-enterprise.list +rm -f /etc/apt/sources.list.d/ceph.list +mv /etc/apt/sources.list /etc/apt/sources.list.pvedisabled +echo Adding Debian Bookworm 12 Original Repos... +echo deb http://deb.debian.org/debian bookworm main > /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bookworm main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian-security/ bookworm-security main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian-security/ bookworm-security main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian bookworm-updates main >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bookworm-updates main >> /etc/apt/sources.list +echo deb http://deb.debian.org/debian bookworm-backports main contrib non-free >> /etc/apt/sources.list +echo deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free >> /etc/apt/sources.list +echo deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription >> /etc/apt/sources.list +apt update +apt install htop fish nala -y +nala update +nala upgrade -y +sleep 2 +pveam update +wget https://s.tyleodev.fr/setup/runner/run-pve-patch -O /bin/pvepatch +chmod +x /bin/pvepatch +echo 'Make a Cron to execute /bin/pvepatch to autoremove Sub Message (Recommended Cron below !, /bin/pvepatch is already Executable and must be run as root.)' +echo '0 0 * * * /bin/pvepatch' +echo Terminated. diff --git a/irp-portainer b/irp-portainer new file mode 100755 index 0000000..0068a19 --- /dev/null +++ b/irp-portainer @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +docker container stop portainer +docker container rm portainer +docker run -d -p 8000:8000 -p 9000:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /store/portainer:/data portainer/portainer-ee:latest \ No newline at end of file diff --git a/irp-qs-setup b/irp-qs-setup new file mode 100755 index 0000000..d65aebe --- /dev/null +++ b/irp-qs-setup @@ -0,0 +1,2 @@ +wget scr.tyleo.dev/irp-quicksudo -O /bin/qs +chmod +x /bin/qs diff --git a/irp-quicksudo b/irp-quicksudo new file mode 100755 index 0000000..56cefe1 --- /dev/null +++ b/irp-quicksudo @@ -0,0 +1,33 @@ +if test -z "$1" +then + USERTARGET=$USER +else + USERTARGET=$1 +fi + +clear +echo "============================================================" +figlet QuickSudo II +echo "============================================================" +echo "============ https://tyleodev.fr == Open Source ============" +echo "============================================================" +echo "/> User Target : $USERTARGET" +echo "/> This Script disable Password Input when using Sudo SU for the current user or choosen one." +## RANDOM PIN +pincode=$(shuf -i 1-100000 -n 1) +####################### + +## CONFIRMATION +echo -n -e "/> Please confirm this action by entering this security PIN Code : ($pincode)" +read -r pinin +if [[ "$pinin" -ne "$pincode" ]] +then + echo -e "!> Pincode $pinin received, there is an error here. Good Bye.${Color_Off}" + echo -e "!> Exiting...${Color_Off}" + exit +fi +echo -e "/> Pincode $pinin received, Accepted.${Color_Off}" +####################### +echo "/> Writing User NOPASSWD to /etc/sudoers.d ..." +echo "$USERTARGET ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USERTARGET-nopasswd +echo "/> Quick Sudo installed for $USERTARGET user. Logoff or TTY Reset may be required for seing the change." diff --git a/irp-recpacks b/irp-recpacks new file mode 100755 index 0000000..4f9f5d4 --- /dev/null +++ b/irp-recpacks @@ -0,0 +1,125 @@ +#!/usr/bin/env bash + +clear +curl https://static.tyleodev.fr/astra/banner-deb +printf "/!\ CE SCRIPT N'EST PLUS MAINTENU. +utilisez installrecpacks-deb en remplacement. +Voici les commandes : + +curl https://s.tyleodev.fr/irp-deb (pour Debian/Ubuntu) +curl https://s.tyleodev.fr/irp-rhel (pour RedHat/Rocky/Alma/Fedora) +" +sleep 10 +echo Version 2.1 - Script de Déploiement Public - Not Supported +echo APT CACHE UPDATING... +sudo apt-get update &>/dev/null +echo APT CACHE UPDATED +sudo apt-get install zsh screenfetch git davfs2 curl wget mc htop nethogs figlet nano -y +echo Adding Sudo Enhanced... +sudo echo Defaults env_reset,pwfeedback > /etc/sudoers.d/11-sudoenh +sudo chmod 0440 /etc/sudoers.d/11-sudoenh +echo -n "Install Docker ? (Y for confirm, Enter for skip)" +read dinst +if [ $dinst = "Y" ]; then + clear + figlet Docker.IO + echo Installing the powerful big blue whale... + sudo apt-get install docker.io docker-compose -y + sudo usermod -a -G docker $USER | echo $USER added to Docker Group +elif [ $dinst = "y" ]; then + clear + figlet Docker.IO + echo Installing the powerful big blue whale... + sudo apt-get install docker.io docker-compose -y + sudo usermod -a -G docker $USER | echo $USER added to Docker Group +else + true +fi +echo -n "Install and enable Portainer ? (Y for confirm, Enter for skip)" +read pinst +if [ $pinst = "Y" ]; then + clear + figlet Portainer.IO + echo -n "Community/Entreprise [C/E]" + read pmode + if [ $pmode = "C" ];then + figlet Community + echo "Installing Portainer (CE) using port 9443..." + sudo docker volume create portainer_data + sudo docker container stop portainer + sudo docker container rm portainer + sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest + elif [ $pmode = "E" ];then + figlet Enterprise + echo "Installing Portainer (EE) using port 10443..." + sudo docker volume create portainer_data + sudo docker container stop portainer + sudo docker container rm portainer + sudo docker run -d -p 8000:8000 -p 10443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest + fi +elif [ $pinst = "y" ]; then + clear + figlet Portainer.IO + echo -n "Community/Entreprise [C/E]" + read pmode + if [ $pmode = "C" ];then + figlet Community + echo "Installing Portainer (CE) using port 9443..." + sudo docker volume create portainer_data + sudo docker container stop portainer + sudo docker container rm portainer + sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest + elif [ $pmode = "E" ];then + figlet Enterprise + echo "Installing Portainer (EE) using port 10443..." + sudo docker volume create portainer_data + sudo docker container stop portainer + sudo docker container rm portainer + sudo docker run -d -p 8000:8000 -p 10443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest + fi +else + true +fi +echo -n "Install XRDP ? (Y for confirm, Enter for skip)" +read xrdpinst +if [ $xrdpinst = "Y" ];then + clear + figlet XRDP + sudo apt-get install xrdp -y +elif [ $xrdpinst = "y" ];then + clear + figlet XRDP + sudo apt-get install xrdp -y +fi + +echo -n "Install X2Go Server & Client ? (Y for confirm, Enter for skip)" +read x2goinst +if [ $xrdpinst = "Y" ];then + clear + figlet X2Go + sudo apt-get install x2goserver x2goclient -y +elif [ $xrdpinst = "y" ];then + clear + figlet X2Go + sudo apt-get install x2goserver x2goclient -y +fi + +echo -n "Install Oh-My-ZSH ? (Y for confirm, Enter for skip)" +read ozhinst +if [ $ozhinst = "Y" ];then + clear + figlet Oh-My-ZSH + sudo apt-get install git curl -y + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + sudo echo '"sh -c $(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"' > /bin/installozsh + sudo chmod +x /bin/installozsh +elif [ $ozhinst = "y" ];then + clear + figlet Oh-My-ZSH + sudo apt-get install git curl -y + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + sudo echo '"sh -c $(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"' > /bin/installozsh + sudo chmod +x /bin/installozsh +fi diff --git a/irp-rhel b/irp-rhel new file mode 100755 index 0000000..ce28b23 --- /dev/null +++ b/irp-rhel @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +if ! command -v rpm &> /dev/null +then + echo "Systéme non RPM - Lancement annulé" + echo "Utilisez irp-deb pour DEB." + echo "https://tyleodev.fr/scripts-crees-par-tyleo/" + exit +fi +echo ------------------------------------------------------------- +curl https://static.tyleodev.fr/astra/banner-rhel +echo "Version 2.3 - Script de Déploiement Public avec DUF 0.8.1" +echo "Ajout support pour Rocky Linux 9.1+" +echo "Ajout support Docker Compose, Version Validée : v2.17.3" +sudo dnf update -y +wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.rpm +wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.rpm +sudo rpm -i gotop_v4.1.4_linux_amd64.rpm +sudo rpm -i duf_0.8.1_linux_amd64.rpm +sudo dnf install epel-release -y +sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo +sudo dnf install -y docker-ce +sudo dnf install -y netdata-web +sudo dnf install -y wget +sudo systemctl start docker.socket +sudo systemctl enable docker.socket +sudo usermod -aG docker $USER +sudo dnf install cockpit cockpit-machines virt-manager libvirt curl nano fish zsh git davfs2 curl wget mc htop nethogs figlet nano util-linux-user ntfs-3g -y +sudo dnf install -y https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm +echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER +sudo usermod -a -G docker $USER +sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /bin/docker-compose +sudo chmod +x /bin/docker-compose +docker-compose --version +echo Docker is now ready. +echo "----------------------" +echo "- Daemon OK -" +echo "- Composer OK -" +echo "- Service Enabled OK -" +echo "----------------------" + +# SERVICES ENABLING +sudo systemctl enable cockpit.socket +sudo systemctl enable libvirt-guests +sudo systemctl enable docker +# START +sudo systemctl start cockpit.socket +sudo systemctl start cockpit +sudo systemctl start libvirt-guests +sudo systemctl start docker + +# CTOP +sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop +sudo chmod +x /usr/local/bin/ctop \ No newline at end of file diff --git a/irp-rocky b/irp-rocky new file mode 100755 index 0000000..01b30b4 --- /dev/null +++ b/irp-rocky @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +if ! command -v rpm &> /dev/null +then + echo "Systéme non RPM - Lancement annulé" + echo "Utilisez irp-deb pour DEB." + echo "https://tyleodev.fr/scripts-crees-par-tyleo/" + exit +fi +echo ------------------------------------------------------------- +curl https://static.tyleodev.fr/astra/banner-rhel +echo "Version 2.3 - Script de Déploiement Public avec DUF 0.8.1" +echo "Ajout support pour Rocky Linux 9.1+" +echo "Ajout support Docker Compose, Version Validée : v2.17.3" +sudo dnf config-manager --set-enabled plus +sudo dnf update -y +sudo dnf install -y wget +wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.rpm +wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.rpm +sudo rpm -i gotop_v4.1.4_linux_amd64.rpm +sudo rpm -i duf_0.8.1_linux_amd64.rpm +sudo dnf install epel-release -y +sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo +sudo dnf install -y docker-ce +sudo dnf install -y nano htop btop glances +sudo systemctl start docker.socket +sudo systemctl enable docker.socket +sudo usermod -aG docker $USER +sudo dnf install cockpit cockpit-machines virt-manager libvirt curl nano fish zsh git davfs2 curl wget mc htop nethogs figlet nano util-linux-user ntfs-3g -y +sudo dnf install -y https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm +echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER +sudo usermod -a -G docker $USER +sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /bin/docker-compose +sudo chmod +x /bin/docker-compose +docker-compose --version +echo Docker is now ready. +echo "----------------------" +echo "- Daemon OK -" +echo "- Composer OK -" +echo "- Service Enabled OK -" +echo "----------------------" + +# SERVICES ENABLING +sudo systemctl enable cockpit.socket +sudo systemctl enable libvirt-guests +sudo systemctl enable docker +# START +sudo systemctl start cockpit.socket +sudo systemctl start cockpit +sudo systemctl start libvirt-guests +sudo systemctl start docker + +### FIREWALLD DISABLING +sudo systemctl disable firewalld +sudo systemctl stop firewalld + +# CTOP +sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop +sudo chmod +x /usr/local/bin/ctop + +sudo timedatectl set-timezone Europe/Paris + +# Final Update +sudo dnf update -y \ No newline at end of file diff --git a/irp-rocky-rdp b/irp-rocky-rdp new file mode 100755 index 0000000..32e2309 --- /dev/null +++ b/irp-rocky-rdp @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +if ! command -v rpm &> /dev/null +then + echo "Systéme non RPM - Lancement annulé" + echo "Utilisez irp-deb pour DEB." + echo "https://tyleodev.fr/scripts-crees-par-tyleo/" + exit +fi +echo ------------------------------------------------------------- +curl https://static.tyleodev.fr/astra/banner-rhel +echo "Version 2.3 - Script de Déploiement Public avec DUF 0.8.1" +echo "Ajout support pour Rocky Linux 9.1+" +echo "Ajout support Docker Compose, Version Validée : v2.17.3" +sudo dnf config-manager --set-enabled plus +sudo dnf update -y +sudo dnf install -y wget +wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.rpm +wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.rpm +sudo rpm -i gotop_v4.1.4_linux_amd64.rpm +sudo rpm -i duf_0.8.1_linux_amd64.rpm +sudo dnf install epel-release -y +sudo dnf install -y xrdp +sudo dnf install -y nano htop btop +sudo dnf install cockpit cockpit-machines virt-manager libvirt curl nano fish zsh git davfs2 curl wget mc htop nethogs figlet nano util-linux-user ntfs-3g -y +sudo dnf install -y https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator-0.5.8-1.el8.noarch.rpm +echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER + +# SERVICES ENABLING +sudo systemctl enable cockpit.socket + +# START +sudo systemctl start cockpit.socket +sudo systemctl start cockpit + +## XRDP +sudo systemctl enable xrdp +sudo systemctl enable xrdp-sesman + +### FIREWALLD DISABLING +sudo systemctl disable firewalld +sudo systemctl stop firewalld + +sudo timedatectl set-timezone Europe/Paris + +# Final Update +sudo dnf update -y \ No newline at end of file diff --git a/irp-senone b/irp-senone new file mode 100755 index 0000000..ed19407 --- /dev/null +++ b/irp-senone @@ -0,0 +1,3 @@ +sudo grubby --update-kernel ALL --args selinux=0 +sleep 2 +sudo reboot \ No newline at end of file diff --git a/irp-service b/irp-service new file mode 100755 index 0000000..3262cc3 --- /dev/null +++ b/irp-service @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +clear + +## COLORS +# Reset +Color_Off='\033[0m' # Text Reset + +# Regular Colors +Black='\033[0;30m' # Black +Red='\033[0;31m' # Red +Green='\033[0;32m' # Green +Yellow='\033[0;33m' # Yellow +Blue='\033[0;34m' # Blue +Purple='\033[0;35m' # Purple +Cyan='\033[0;36m' # Cyan +White='\033[0;37m' # White + +# Bold +BBlack='\033[1;30m' # Black +BRed='\033[1;31m' # Red +BGreen='\033[1;32m' # Green +BYellow='\033[1;33m' # Yellow +BBlue='\033[1;34m' # Blue +BPurple='\033[1;35m' # Purple +BCyan='\033[1;36m' # Cyan +BWhite='\033[1;37m' # White + +# Underline +UBlack='\033[4;30m' # Black +URed='\033[4;31m' # Red +UGreen='\033[4;32m' # Green +UYellow='\033[4;33m' # Yellow +UBlue='\033[4;34m' # Blue +UPurple='\033[4;35m' # Purple +UCyan='\033[4;36m' # Cyan +UWhite='\033[4;37m' # White + +# Background +On_Black='\033[40m' # Black +On_Red='\033[41m' # Red +On_Green='\033[42m' # Green +On_Yellow='\033[43m' # Yellow +On_Blue='\033[44m' # Blue +On_Purple='\033[45m' # Purple +On_Cyan='\033[46m' # Cyan +On_White='\033[47m' # White + +# High Intensity +IBlack='\033[0;90m' # Black +IRed='\033[0;91m' # Red +IGreen='\033[0;92m' # Green +IYellow='\033[0;93m' # Yellow +IBlue='\033[0;94m' # Blue +IPurple='\033[0;95m' # Purple +ICyan='\033[0;96m' # Cyan +IWhite='\033[0;97m' # White + +# Bold High Intensity +BIBlack='\033[1;90m' # Black +BIRed='\033[1;91m' # Red +BIGreen='\033[1;92m' # Green +BIYellow='\033[1;93m' # Yellow +BIBlue='\033[1;94m' # Blue +BIPurple='\033[1;95m' # Purple +BICyan='\033[1;96m' # Cyan +BIWhite='\033[1;97m' # White + +# High Intensity backgrounds +On_IBlack='\033[0;100m' # Black +On_IRed='\033[0;101m' # Red +On_IGreen='\033[0;102m' # Green +On_IYellow='\033[0;103m' # Yellow +On_IBlue='\033[0;104m' # Blue +On_IPurple='\033[0;105m' # Purple +On_ICyan='\033[0;106m' # Cyan +On_IWhite='\033[0;107m' # White +###################### + +echo -n -e "${BBlue}$askfor${Color_Off} Create a Service Account ? (Y/n):" +read -r accept +if [[ $accept = Y ]] || [[ $accept = y ]] ; then + echo -n -e "${BBlue}$askfor${Color_Off} Username : " + read username + if [[ -f /usr/bin/fish ]]; then + useradd $username --shell /usr/bin/fish -G sudo -m -d /home/srv-$username -c "Service Account" -b /home/srv-$username + echo "$username ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/srv-$username + passwd $username + else + useradd $username --shell /usr/bin/bash -G sudo -m -d /home/srv-$username -c "Service Account" -b /home/srv-$username + echo "$username ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/srv-$username + passwd $username + fi + + sleep 3 +fi +accept="n" \ No newline at end of file diff --git a/irp-srv-acc b/irp-srv-acc new file mode 100755 index 0000000..3aaea29 --- /dev/null +++ b/irp-srv-acc @@ -0,0 +1,23 @@ +# Setup Service Account +clear +echo =========================================== +echo = Server Node Installation as Docker Host = +echo =========================================== +echo = Patching Sudo with Ruby Group Patch... +groupadd --gid 50000 ruby +echo "%ruby ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ruby-root +echo = Service Account Creation... +echo -n "= Username (lowercase): " +read Suid +echo = Creating $Suid... +useradd -d /home/service-$Suid -m $Suid +echo = Defining Shell to FiSH... +usermod --shell /usr/bin/fish $Suid +usermod --shell /usr/bin/fish root +echo = Adding to Groups Wheel, Ruby and Docker... +usermod -aG wheel $Suid +usermod -aG ruby $Suid +usermod -aG docker $Suid +echo = Set Password for $Suid Account... +passwd $Suid +echo = Setup $Suid Quick Sudo... diff --git a/irp-storm b/irp-storm new file mode 100755 index 0000000..50caf6e --- /dev/null +++ b/irp-storm @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +clear +echo +curl static.tyleodev.fr/astra/scr_banner +sudo apt install python3-pip -y +pip3 --version +sudo pip3 install stormssh diff --git a/irp-sudoenh b/irp-sudoenh new file mode 100755 index 0000000..d4df09c --- /dev/null +++ b/irp-sudoenh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +wget static.tyleodev.fr/11-sudoenhanced +sudo mv 11-sudoenhanced /etc/sudoers.d +sudo chmod 0440 /etc/sudoers.d/11-sudoenhanced \ No newline at end of file diff --git a/irp-suse-rdp b/irp-suse-rdp new file mode 100755 index 0000000..6705596 --- /dev/null +++ b/irp-suse-rdp @@ -0,0 +1,10 @@ +sudo zypper update +sudo zypper install xrdp xorgxrdp -y +sudo systemctl enable firewalld +sudo systemctl start firewalld +sudo systemctl enable xrdp +sudo systemctl start xrdp +sudo systemctl enable xrdp-sesman +sudo systemctl start xrdp-sesman +sudo firewall-cmd --permanent --zone=public --add-service=ms-wbt +sudo firewall-cmd --reload diff --git a/irp-taskmgr b/irp-taskmgr new file mode 100755 index 0000000..7afce98 --- /dev/null +++ b/irp-taskmgr @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +HOSTED_BINARY="http://s.tyleodev.fr/scr/taskmgr.bash" +EXEC_BINARY1="/bin/taskmgr" +EXEC_BINARY2="/bin/tmgr" + +clear +echo "/>[apt] Vérification de la présence de WGET ..." +sleep 2 +if command -v wget &>/dev/null; then + echo "/>[info] Paquet présent." + sleep 2 +else + echo "/>[info] Paquet absent, installation automatique..." + sudo apt install -y wget + sleep 2 +fi +echo "/>[apt] Vérification de la présence de SUDO ..." +sleep 2 +if command -v sudo &>/dev/null; then + echo "/>[info] Paquet présent." + sleep 2 +else + echo "/>[info] Paquet absent, installation automatique..." + sudo apt install -y sudo + sleep 2 +fi +sleep 2 +echo "/>[wget] Téléchargement vers $EXEC_BINARY1 ..." +echo "/>[info] Source : $HOSTED_BINARY" +echo "/>[info] Destination : $EXEC_BINARY1" +sudo wget $HOSTED_BINARY -O $EXEC_BINARY1 &>/dev/null +sleep 2 +echo "/>[wget] Téléchargement vers $EXEC_BINARY2 ..." +echo "/>[info] Source : $HOSTED_BINARY" +echo "/>[info] Destination : $EXEC_BINARY2" +sudo wget $HOSTED_BINARY -O $EXEC_BINARY2 &>/dev/null +sleep 2 + +sleep 2 +echo "/>[chmod +x $EXEC_BINARY1] Préparation à l'execution autonome ..." +sudo chmod +x $EXEC_BINARY1 +sleep 2 +echo "/>[chmod +x $EXEC_BINARY2] Préparation à l'execution autonome ..." +sudo chmod +x $EXEC_BINARY2 +echo "/>[info] Utilisez les commandes taskmgr ou tmgr pour utiliser le gestionnaire." +echo "/>[info] Opération Terminée." \ No newline at end of file diff --git a/irp-thunderbird b/irp-thunderbird new file mode 100755 index 0000000..d015042 --- /dev/null +++ b/irp-thunderbird @@ -0,0 +1,6 @@ +wget https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/115.2.2/linux-x86_64/en-US/thunderbird-115.2.2.tar.bz2 +tar xjf thunderbird-*.tar.bz2 +sudo mv thunderbird /opt +sudo ln -s /opt/thunderbird/thunderbird /usr/local/bin/thunderbird +sudo wget https://raw.githubusercontent.com/mozilla/sumo-kb/main/installing-thunderbird-linux/thunderbird.desktop -P /usr/local/share/applications + diff --git a/irp-ubuntu-pro b/irp-ubuntu-pro new file mode 100755 index 0000000..2e48f1a --- /dev/null +++ b/irp-ubuntu-pro @@ -0,0 +1,12 @@ +echo "[apt] Updating Index ..." +sudo apt update &> /dev/null +echo "[apt] Updating System ..." +sudo apt upgrade -y &> /dev/null +echo "[apt] Installing/Checking Ubuntu Pro Presence ..." +sudo apt install ubuntu-advantage-tools -y &> /dev/null +echo -n "Ubuntu Pro Token : " +read token +echo "[pro] Attaching Token ..." +sudo pro attach $token +sudo pro status +echo "[irp] Terminated." diff --git a/irp-xen b/irp-xen new file mode 100755 index 0000000..55b9d00 --- /dev/null +++ b/irp-xen @@ -0,0 +1,2 @@ +bash -c "$(wget -qO- https://xoa.io/deploy)" + diff --git a/irp-ytmp3 b/irp-ytmp3 new file mode 100755 index 0000000..83d0221 --- /dev/null +++ b/irp-ytmp3 @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +clear +curl s.tyleodev.fr/astra/scr_banner + +sudo zypper in -y youtube-dl figlet ffmpeg yt-dlp curl +sudo wget https://s.tyleodev.fr/scr/ytmp3 +sudo mv ytmp3 /bin +sudo chmod +x /bin/ytmp3 +echo --------------- USAGE --------------- +echo 'Use it like : "ytmp3 (url)"' +echo 'It support Playlists and Channel All' diff --git a/irp-ytmp3_alpine b/irp-ytmp3_alpine new file mode 100755 index 0000000..94f5008 --- /dev/null +++ b/irp-ytmp3_alpine @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +wget https://static.tyleodev.fr/scr/ytmp3 +mv ytmp3 /bin +chmod +x /bin/ytmp3 \ No newline at end of file diff --git a/menu b/menu new file mode 100755 index 0000000..3673054 --- /dev/null +++ b/menu @@ -0,0 +1,127 @@ +#!/usr/bin/env bash + +clear + +# MENU ##################################################### + +echo "-------------------------------------------------------" +echo "- Menu Interactif des Scripts de Tyleo (IRP-*) -" +echo "-------------------------------------------------------" +echo "- 0/Q/q. Annuler et quitter -" +echo "----System---------------------------------------------" +echo "- 1. Script de deploiement de base UBUNTU/DEB -" +echo "- 2. Script de deploiement de base RPM/RHEL -" +echo "- 3. Script de deploiement de base END/ARCH -" +echo "- QS. Installer le QuickSudo (sudo su sans pass) -" +echo "----Tools----------------------------------------------" +echo "- 4. Installer CTOP - Task Manager for Docker -" +echo "- 5. Installer BTOP - Task Manager for Linux -" +echo "- 6. Installer LZD - Project Manager for Docker -" +echo "- 7. Installer Cockpit Docker - Fixed Version 265+ -" +echo "----Modules-Docker-------------------------------------" +echo "- 8. Deployer Docker-UPD Zone Dev - Cron à 2h-J1/Sem -" +echo "- 9. Deployer Docker-PRD Zone Prod - Cron à 00h00 -" +echo "- P. Deployer Portainer.IO sur le port 10443 (HTTPS) -" +echo "- K. Deployer une instance Uptime Kuma (Interactive) -" +echo "-------------------------------------------------------" + +############################################################ + +# Choix +echo -n "- Votre choix : " + +# Var Save +read ask + +# 1. Script de deploiement de base UBUNTU/DEB +if [[ $ask = "QS" ]]; then + curl s.tyleodev.fr/setup/irp-qs | bash + exit +fi + +# 1. Script de deploiement de base UBUNTU/DEB +if [[ $ask = [1] ]]; then + curl s.tyleodev.fr/setup/irp-deb | bash + exit +fi + + +# 2. Script de deploiement de base RPM/RHEL +if [[ $ask = [2] ]]; then + curl s.tyleodev.fr/setup/irp-rhel | bash + exit +fi + + +# 3. Script de deploiement de base END/ARCH +if [[ $ask = [3] ]]; then + curl s.tyleodev.fr/setup/irp-arch | bash + exit +fi + + +# 4. Installer CTOP - Task Manager for Docker +if [[ $ask = [4] ]]; then + curl s.tyleodev.fr/setup/irp-ctop | bash + exit +fi + + +# 5. Installer BTOP - Task Manager for Linux +if [[ $ask = [5] ]]; then + sudo apt-get install btop -y + exit +fi + + +# 6. Installer LZD - Project Manager for Docker +if [[ $ask = [6] ]]; then + curl s.tyleodev.fr/setup/irp-lzd | bash + curl s.tyleodev.fr/setup/irp-lazydocker | bash + exit +fi + + +# 7. Installer Cockpit Docker - Fixed Version 265+ +if [[ $ask = [7] ]]; then + sudo apt-get remove cockpit-docker -y + curl s.tyleodev.fr/setup/irp-cdocker | bash + exit +fi + + +# 8. Deployer Docker-UPD Zone Dev - Cron à 2h-J1/Sem +if [[ $ask = [8] ]]; then + curl s.tyleodev.fr/setup/irp-dockerupd-dev | bash + exit +fi + + +# 9. Deployer Docker-PRD Zone Prod - Cron à 00h00 +if [[ $ask = [9] ]]; then + curl s.tyleodev.fr/setup/irp-dockerupd-prod | bash + exit +fi + + +# P. Deployer Portainer.IO sur le port 10443 (HTTPS) +if [[ $ask = [P] ]]; then + curl s.tyleodev.fr/setup/irp-portainer | bash + exit +fi + + +# K. Deployer une instance Uptime Kuma (Interactive) +if [[ $ask = [K] ]]; then + curl s.tyleodev.fr/setup/irp-kuma | bash + exit +fi + + +# Bonus. +if [[ $ask = [B] ]]; then + curl s.tyleodev.fr/setup/irp-ytmp3 | bash + exit +fi + +exit \ No newline at end of file diff --git a/old/irp-deb b/old/irp-deb new file mode 100755 index 0000000..28ff1ae --- /dev/null +++ b/old/irp-deb @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +if ! command -v dpkg &> /dev/null +then + echo "Systéme non DEB - Lancement annulé" + echo "Utilisez irp-rhel pour RPM." + echo "https://tyleodev.fr/scripts-crees-par-tyleo/" + exit +fi +echo ------------------------------------------------------------- +curl https://static.tyleodev.fr/astra/banner-deb +echo Version 3 - Script de Déploiement Public avec DUF 0.8.1 +echo Sans Portainer - Mode Autonome avec Docker Compose +echo Utilisez irp-portainer pour installer Portainer. +echo ------------------------------------------------------------- +wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb +sudo apt-get install ./duf_0.8.1_linux_amd64.deb +sudo apt-get update &>/dev/null +sudo apt-get install zsh git tuned curl wget mc htop nethogs figlet nano docker.io docker-compose -y +sudo apt-get install netdata-web cockpit libvirt virt-manager -y +wget https://launchpad.net/ubuntu/+source/cockpit/215-1~ubuntu19.10.1/+build/18889196/+files/cockpit-docker_215-1~ubuntu19.10.1_all.deb +wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.deb +sudo apt-get install ./gotop_v4.1.4_linux_amd64.deb -y +sudo apt-get install ./cockpit-docker_215-1~ubuntu19.10.1_all.deb -y +sudo wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.10/cockpit-navigator_0.5.10-1focal_all.deb +sudo apt-get install ./cockpit-navigator_0.5.8-1focal_all.deb -y +echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER +sudo usermod -a -G docker $USER +sudo chown $USER:docker /var/run/docker.sock +sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop +sudo chmod +x /usr/local/bin/ctop +echo Terminé. diff --git a/recpack/alp b/recpack/alp new file mode 100755 index 0000000..7ab2114 --- /dev/null +++ b/recpack/alp @@ -0,0 +1 @@ +apk add curl wget aria2 screen sudo shadow htop btop nano vim fish bash zsh openssh xrdp xorgxrdp chromium bat fd ack ncdu duf exa \ No newline at end of file diff --git a/repo/mozilla.list b/repo/mozilla.list new file mode 100755 index 0000000..953cbed --- /dev/null +++ b/repo/mozilla.list @@ -0,0 +1,2 @@ + +deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main \ No newline at end of file diff --git a/runner/exemple-crons b/runner/exemple-crons new file mode 100755 index 0000000..0705dcb --- /dev/null +++ b/runner/exemple-crons @@ -0,0 +1,34 @@ +# Curl : s.tyleodev.fr/setup/runner/run-* + +## Maj de Securite toutes les heures +## Maj Generales tout les jours a 00h00 +## Maj Integrales tout les 1,2,3,4.. du mois (fonction de prod vm) incluant reboot et arret propre Docker. +## Nettoyage Docker pour Production et Bastion (purge images, networks etc..) si Compose est utilise, pas d'impact, pas de perte. + +# VM1 +####################################################################### +0 * * * * curl s.tyleodev.fr/setup/runner/run-security-updates | bash +0 0 * * * curl s.tyleodev.fr/setup/runner/run-global-updates | bash +0 0 1 * * curl s.tyleodev.fr/setup/runner/run-fullupdates | bash +30 * * * * curl s.tyleodev.fr/setup/runner/run-docker-cleanup | bash + +# VM2 +####################################################################### +0 * * * * curl s.tyleodev.fr/setup/runner/run-security-updates | bash +0 0 * * * curl s.tyleodev.fr/setup/runner/run-global-updates | bash +0 0 2 * * curl s.tyleodev.fr/setup/runner/run-fullupdates | bash +30 * * * * curl s.tyleodev.fr/setup/runner/run-docker-cleanup | bash + +# VM3 +####################################################################### +0 * * * * curl s.tyleodev.fr/setup/runner/run-security-updates | bash +0 0 * * * curl s.tyleodev.fr/setup/runner/run-global-updates | bash +0 0 3 * * curl s.tyleodev.fr/setup/runner/run-fullupdates | bash +30 * * * * curl s.tyleodev.fr/setup/runner/run-docker-cleanup | bash + +# VM4 +####################################################################### +0 * * * * curl s.tyleodev.fr/setup/runner/run-security-updates | bash +0 0 * * * curl s.tyleodev.fr/setup/runner/run-global-updates | bash +0 0 4 * * curl s.tyleodev.fr/setup/runner/run-fullupdates | bash +30 * * * * curl s.tyleodev.fr/setup/runner/run-docker-cleanup | bash \ No newline at end of file diff --git a/runner/run-docker-cleanup b/runner/run-docker-cleanup new file mode 100755 index 0000000..1613201 --- /dev/null +++ b/runner/run-docker-cleanup @@ -0,0 +1,4 @@ +#!/bin/bash + +# Supprimer tous les éléments Docker inutilisés +docker system prune -af diff --git a/runner/run-docker-reloadall b/runner/run-docker-reloadall new file mode 100755 index 0000000..b2df6ed --- /dev/null +++ b/runner/run-docker-reloadall @@ -0,0 +1,4 @@ +#!/bin/bash + +# Redémarrer tous les conteneurs Docker +docker restart $(docker ps --filter "status=running" -q) diff --git a/runner/run-fullupdate b/runner/run-fullupdate new file mode 100755 index 0000000..8067058 --- /dev/null +++ b/runner/run-fullupdate @@ -0,0 +1,17 @@ +#!/bin/bash + +# Mettre à jour Ubuntu +sudo apt-get update +sudo apt-get upgrade -y + +# Mettre à jour chaque image Docker +sudo docker image ls | awk '{print $1}' | tail -n +2 | xargs -L1 docker pull + +# Arrêter tous les conteneurs Docker +sudo docker stop $(sudo docker ps -aq) + +# Attente de sécurité +sleep 120 + +# Redémarrer le système +sudo reboot diff --git a/runner/run-global-updates b/runner/run-global-updates new file mode 100755 index 0000000..bb68f7c --- /dev/null +++ b/runner/run-global-updates @@ -0,0 +1,13 @@ +#!/bin/bash + +export DEBIAN_FRONTEND=noninteractive + +# Mettre à jour la liste des paquets disponibles +sudo apt-get update + +# Mettre à jour tous les paquets sans demander confirmation +sudo apt-get -y upgrade + +# Nettoyer le cache des paquets téléchargés pour libérer de l'espace disque +sudo apt-get autoclean -y +sudo apt-get autoremove -y \ No newline at end of file diff --git a/runner/run-pbs-patch b/runner/run-pbs-patch new file mode 100755 index 0000000..717a783 --- /dev/null +++ b/runner/run-pbs-patch @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +clear +echo ======================================================================== +echo ============= Proxmox Sub Message Killer ==== Tyleo Script ============= +echo ======================================================================== +echo = Patching... +echo == Restarting PBS Proxy... +# Patch du fichier JS +sed -i.bak "s/.data.status.toLowerCase() !== 'active') {/.data.status.toLowerCase() !== 'active') { orig_cmd\(\); } else if ( false ) {/" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js +# Restart PBS Web +systemctl restart proxmox-backup-proxy.service \ No newline at end of file diff --git a/runner/run-pve-patch b/runner/run-pve-patch new file mode 100755 index 0000000..f8be791 --- /dev/null +++ b/runner/run-pve-patch @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +clear +echo ======================================================================== +echo ============= Proxmox Sub Message Killer ==== Tyleo Script ============= +echo ======================================================================== +echo = Patching... +echo == Restarting PVE Proxy... +# Patch du fichier JS +sed -i.bak "s/.data.status.toLowerCase() !== 'active') {/.data.status.toLowerCase() !== 'active') { orig_cmd\(\); } else if ( false ) {/" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js +# Restart PVE Web +systemctl restart pveproxy.service \ No newline at end of file diff --git a/runner/run-security-updates b/runner/run-security-updates new file mode 100755 index 0000000..63ccea9 --- /dev/null +++ b/runner/run-security-updates @@ -0,0 +1,7 @@ +#!/bin/bash + +# Mettre à jour la liste des paquets disponibles +sudo apt-get update + +# Mettre à jour tous les paquets de sécurité disponibles +sudo apt-get upgrade -s | grep "upgraded," | awk '{print $1}' | xargs sudo apt-get install -y \ No newline at end of file diff --git a/spec/irp-converttoserver b/spec/irp-converttoserver new file mode 100755 index 0000000..a641853 --- /dev/null +++ b/spec/irp-converttoserver @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +clear +echo "/>[info] Welcome - Bienvenue - Bienvenido - مرحبا بكم - 欢迎 - いらっしゃいませ" +echo "/>[info] Script IRP-CONVERTTOSERVER v1 pour Safyr IV par Tyleo Dev™️ - Convertisseur de distribution vers un usage Serveur (sans bureau)" + +echo "/>[info] Vérification de l'OS ..." +if ! command -v dpkg 1> /dev/null +then + echo "/>[error] Systéme non DEB - Lancement annulé" + echo "/>[error] Utilisez irp-rhel pour RPM." + echo "/>[info] curl s.tyleodev.fr/setup/irp-rhel | bash" + exit +fi + +echo "!>[WARNING] Si il s'agit d'un PC de bureau ou d'une installation pour usage normal, faite CTRL+C dans les 10 secondes qui suivent !!" +sleep 10 +echo "/>(info) DPKG Détécté ==> OK" +echo "/>[apt] Mise à jour de l'Index APT" +sudo apt-get update +echo "/>[apt] Suppression des paquets de Bureau (DE) ..."e +sudo apt-get purge plymouth -y +sudo apt-get remove libx11.* libqt.* libgtk.* -y +echo "/>[info] Conversion Terminée, un reboot est nécessaire. Reboot dans 5 secondes." +sleep 5 +sudo reboot -f \ No newline at end of file diff --git a/spec/irp-cubic b/spec/irp-cubic new file mode 100755 index 0000000..6511687 --- /dev/null +++ b/spec/irp-cubic @@ -0,0 +1,4 @@ +sudo apt-add-repository universe +sudo apt-add-repository ppa:cubic-wizard/release +sudo apt update +sudo apt install --no-install-recommends cubic \ No newline at end of file diff --git a/spec/irp-gnomerdp b/spec/irp-gnomerdp new file mode 100755 index 0000000..1adf0b1 --- /dev/null +++ b/spec/irp-gnomerdp @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +sudo systemctl start gnome-remote-desktop +sudo systemctl --user start gnome-remote-desktop \ No newline at end of file diff --git a/taskmgr.bash b/taskmgr.bash new file mode 100755 index 0000000..9481685 --- /dev/null +++ b/taskmgr.bash @@ -0,0 +1,66 @@ +#!/bin/bash + +clear +echo "------------------------------------------------" +echo "|---- Task Managers (taskmgr for Linux) -------|" +echo "------------------------------------------------" +echo "| 1. CTOP | Docker Task Manager |" +echo "| 2. HTOP | Linux Task Manager |" +echo "| 3. BTOP | Linux Task Manager |" +echo "| 4. ATOP | Linux Task Manager |" +echo "| 5. TOP | POSIX/UNIX Task Manager |" +echo "| Q. QUIT / Ctrl+C | Quitter ce menu |" +echo "------------------------------------------------" +echo -n " Votre choix [1..5/Q]" +read ask +if [[ $ask = [2] ]]; then + if command -v htop &> /dev/null + then + htop + else + sudo apt-get install htop -y + htop + fi +fi + +if [[ $ask = [3] ]]; then + if command -v btop &> /dev/null + then + btop + else + sudo apt-get install btop -y + btop + fi +fi + +if [[ $ask = [4] ]]; then + if command -v atop &> /dev/null + then + atop + else + sudo apt-get install atop -y + atop + fi +fi + +if [[ $ask = [1] ]]; then + if command -v ctop &> /dev/null + then + ctop + else + sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /bin/ctop + sudo chmod +x /bin/ctop + ctop + fi +fi + +if [[ $ask = [5] ]]; then + if command -v top &> /dev/null + then + top + else + sudo apt-get install top -y + top + fi +fi +exit \ No newline at end of file diff --git a/taskmgr.bash.1 b/taskmgr.bash.1 new file mode 100755 index 0000000..9481685 --- /dev/null +++ b/taskmgr.bash.1 @@ -0,0 +1,66 @@ +#!/bin/bash + +clear +echo "------------------------------------------------" +echo "|---- Task Managers (taskmgr for Linux) -------|" +echo "------------------------------------------------" +echo "| 1. CTOP | Docker Task Manager |" +echo "| 2. HTOP | Linux Task Manager |" +echo "| 3. BTOP | Linux Task Manager |" +echo "| 4. ATOP | Linux Task Manager |" +echo "| 5. TOP | POSIX/UNIX Task Manager |" +echo "| Q. QUIT / Ctrl+C | Quitter ce menu |" +echo "------------------------------------------------" +echo -n " Votre choix [1..5/Q]" +read ask +if [[ $ask = [2] ]]; then + if command -v htop &> /dev/null + then + htop + else + sudo apt-get install htop -y + htop + fi +fi + +if [[ $ask = [3] ]]; then + if command -v btop &> /dev/null + then + btop + else + sudo apt-get install btop -y + btop + fi +fi + +if [[ $ask = [4] ]]; then + if command -v atop &> /dev/null + then + atop + else + sudo apt-get install atop -y + atop + fi +fi + +if [[ $ask = [1] ]]; then + if command -v ctop &> /dev/null + then + ctop + else + sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /bin/ctop + sudo chmod +x /bin/ctop + ctop + fi +fi + +if [[ $ask = [5] ]]; then + if command -v top &> /dev/null + then + top + else + sudo apt-get install top -y + top + fi +fi +exit \ No newline at end of file diff --git a/taskmgr.bash.2 b/taskmgr.bash.2 new file mode 100755 index 0000000..9481685 --- /dev/null +++ b/taskmgr.bash.2 @@ -0,0 +1,66 @@ +#!/bin/bash + +clear +echo "------------------------------------------------" +echo "|---- Task Managers (taskmgr for Linux) -------|" +echo "------------------------------------------------" +echo "| 1. CTOP | Docker Task Manager |" +echo "| 2. HTOP | Linux Task Manager |" +echo "| 3. BTOP | Linux Task Manager |" +echo "| 4. ATOP | Linux Task Manager |" +echo "| 5. TOP | POSIX/UNIX Task Manager |" +echo "| Q. QUIT / Ctrl+C | Quitter ce menu |" +echo "------------------------------------------------" +echo -n " Votre choix [1..5/Q]" +read ask +if [[ $ask = [2] ]]; then + if command -v htop &> /dev/null + then + htop + else + sudo apt-get install htop -y + htop + fi +fi + +if [[ $ask = [3] ]]; then + if command -v btop &> /dev/null + then + btop + else + sudo apt-get install btop -y + btop + fi +fi + +if [[ $ask = [4] ]]; then + if command -v atop &> /dev/null + then + atop + else + sudo apt-get install atop -y + atop + fi +fi + +if [[ $ask = [1] ]]; then + if command -v ctop &> /dev/null + then + ctop + else + sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /bin/ctop + sudo chmod +x /bin/ctop + ctop + fi +fi + +if [[ $ask = [5] ]]; then + if command -v top &> /dev/null + then + top + else + sudo apt-get install top -y + top + fi +fi +exit \ No newline at end of file diff --git a/taskmgr.bash.3 b/taskmgr.bash.3 new file mode 100755 index 0000000..9481685 --- /dev/null +++ b/taskmgr.bash.3 @@ -0,0 +1,66 @@ +#!/bin/bash + +clear +echo "------------------------------------------------" +echo "|---- Task Managers (taskmgr for Linux) -------|" +echo "------------------------------------------------" +echo "| 1. CTOP | Docker Task Manager |" +echo "| 2. HTOP | Linux Task Manager |" +echo "| 3. BTOP | Linux Task Manager |" +echo "| 4. ATOP | Linux Task Manager |" +echo "| 5. TOP | POSIX/UNIX Task Manager |" +echo "| Q. QUIT / Ctrl+C | Quitter ce menu |" +echo "------------------------------------------------" +echo -n " Votre choix [1..5/Q]" +read ask +if [[ $ask = [2] ]]; then + if command -v htop &> /dev/null + then + htop + else + sudo apt-get install htop -y + htop + fi +fi + +if [[ $ask = [3] ]]; then + if command -v btop &> /dev/null + then + btop + else + sudo apt-get install btop -y + btop + fi +fi + +if [[ $ask = [4] ]]; then + if command -v atop &> /dev/null + then + atop + else + sudo apt-get install atop -y + atop + fi +fi + +if [[ $ask = [1] ]]; then + if command -v ctop &> /dev/null + then + ctop + else + sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /bin/ctop + sudo chmod +x /bin/ctop + ctop + fi +fi + +if [[ $ask = [5] ]]; then + if command -v top &> /dev/null + then + top + else + sudo apt-get install top -y + top + fi +fi +exit \ No newline at end of file diff --git a/up/2004-2204 b/up/2004-2204 new file mode 100755 index 0000000..f650e8a --- /dev/null +++ b/up/2004-2204 @@ -0,0 +1,10 @@ +sudo cp /etc/apt/sources.list /etc/apt/sources.list.focal +sudo sed -i "s/focal/jammy/g" /etc/apt/sources.list +sudo apt-get update +sudo apt-get upgrade -y +sudo apt-get dist-upgrade -y +sudo apt-get dist-upgrade -y +sudo apt-get autoremove -y +sudo apt-get clean -y +echo "Reboot to ensure system stability." +lsb_release --all \ No newline at end of file diff --git a/up/2004-2304 b/up/2004-2304 new file mode 100755 index 0000000..dd8390b --- /dev/null +++ b/up/2004-2304 @@ -0,0 +1,2 @@ +curl s.tyleodev.fr/setup/up/2004-2204 | sudo bash +curl s.tyleodev.fr/setup/up/2204-2304 | sudo bash \ No newline at end of file diff --git a/up/2204-2304 b/up/2204-2304 new file mode 100755 index 0000000..5b693fd --- /dev/null +++ b/up/2204-2304 @@ -0,0 +1,10 @@ +sudo cp /etc/apt/sources.list /etc/apt/sources.list.jammy +sudo sed -i "s/jammy/lunar/g" /etc/apt/sources.list +sudo apt-get update +sudo apt-get upgrade -y +sudo apt-get dist-upgrade -y +sudo apt-get dist-upgrade -y +sudo apt-get autoremove -y +sudo apt-get clean -y +echo "Reboot to ensure system stability." +lsb_release --all \ No newline at end of file diff --git a/up/rocky8-9 b/up/rocky8-9 new file mode 100755 index 0000000..662e916 --- /dev/null +++ b/up/rocky8-9 @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# Securely stop services (Docker+LibVirt) +sudo systemctl stop libvirt0 +sudo systemctl stop libvirt +sudo systemctl stop docker.socket +sudo systemctl stop docker + +# Update current system packages +sudo dnf up -y +sudo dnf in wget -y + +# Install Upgrade Packages (To 9.1 Release) +sudo dnf in -y https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-gpg-keys-9.1-1.11.el9.noarch.rpm +sudo dnf in -y https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-release-9.1-1.11.el9.noarch.rpm +sudo dnf in -y https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-repos-9.1-1.11.el9.noarch.rpm + +# Install 9.1 packages by overgrading (erasing over it) then Sync Distro to 9.1 +sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y + +# RPM Database Rebuild then Reboot to operate +sudo rpm --rebuilddb + +# REBOOT +sudo reboot \ No newline at end of file