From b5e4f0542939c1778a23936d134fe048d1b8e6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CAlbert?= Date: Thu, 2 Feb 2023 09:28:05 +0100 Subject: [PATCH] chgt scripts debian11 --- pre/gsbboot | 2 +- scripts/Debian11/chname | 9 --------- scripts/Debian11/gsb-start | 1 - scripts/Debian11/s-adm-start | 4 ---- scripts/debian11/chname | 14 ++++++++++++++ scripts/debian11/gsb-start | 11 +++++++++++ scripts/debian11/s-adm-start | 15 +++++++++++++++ 7 files changed, 41 insertions(+), 15 deletions(-) delete mode 100644 scripts/Debian11/chname delete mode 100644 scripts/Debian11/gsb-start delete mode 100644 scripts/Debian11/s-adm-start create mode 100644 scripts/debian11/chname create mode 100644 scripts/debian11/gsb-start create mode 100644 scripts/debian11/s-adm-start diff --git a/pre/gsbboot b/pre/gsbboot index fa07250..6271a70 100644 --- a/pre/gsbboot +++ b/pre/gsbboot @@ -34,7 +34,7 @@ if [[ $? != 0 ]]; then ${APT} install -y git-core fi ${APT} update -${APT} upgrade -y +#${APT} upgrade -y which ansible >> /dev/null if [[ $? != 0 ]]; then diff --git a/scripts/Debian11/chname b/scripts/Debian11/chname deleted file mode 100644 index 8262900..0000000 --- a/scripts/Debian11/chname +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [[ $1 == "version" ]] ; then - echo 'chname v1.0 pour debian 11' - exit 0 -fi -sed -i "s/bullseye/$1/g" /etc/host{s,name} -echo 'redemarrer pour finaliser le changement du nom' -exit 0 diff --git a/scripts/Debian11/gsb-start b/scripts/Debian11/gsb-start deleted file mode 100644 index 79de328..0000000 --- a/scripts/Debian11/gsb-start +++ /dev/null @@ -1 +0,0 @@ -apt update;upgrade -y;mkdir -p /root/tools/ansible;cd /root/tools/ansible;git clone https://gitea.lyc-lecastel.fr/gadmin/gsb2023.git;cd gsb2023/pre;export DEPL=192.168.99.99;bash gsbboot;cd ../..;bash pull-config diff --git a/scripts/Debian11/s-adm-start b/scripts/Debian11/s-adm-start deleted file mode 100644 index cb3614b..0000000 --- a/scripts/Debian11/s-adm-start +++ /dev/null @@ -1,4 +0,0 @@ -apt update;apt upgrade -y; -mkdir -p tools/ansible;cd tools/ansible;git clone https://gitea.lyc-lecastel.fr/gadmin/gsb2023.git; -cd gsb2023/pre;bash inst-depl;cd /var/www/html/gsbstore;bash getall; -cd /root/tools/ansible/gsb2023/pre;bash gsbboot; cd ..;bash pull-config; diff --git a/scripts/debian11/chname b/scripts/debian11/chname new file mode 100644 index 0000000..bdfd7d0 --- /dev/null +++ b/scripts/debian11/chname @@ -0,0 +1,14 @@ +#!/bin/bash +if [[ $# != 1 ]] ; then + echo "$0 - renomme une VM" + echo "usage : $0 " + exit 1 +fi +if [[ $1 == "version" ]] ; then + echo 'chname v1.1 pour debian 11' + exit 0 +fi +oldname=$(hostname) +sed -i "s/${oldname}/$1/g" /etc/host{s,name} +echo 'redemarrer pour finaliser le changement du nom' +exit 0 diff --git a/scripts/debian11/gsb-start b/scripts/debian11/gsb-start new file mode 100644 index 0000000..d578de8 --- /dev/null +++ b/scripts/debian11/gsb-start @@ -0,0 +1,11 @@ +#!/bin/bash +apt-get update +#upgrade -y +mkdir -p /root/tools/ansible +cd /root/tools/ansible +git clone https://gitea.lyc-lecastel.fr/gadmin/gsb2023.git +cd gsb2023/pre +export DEPL=192.168.99.99 +bash gsbboot +cd ../.. +bash pull-config diff --git a/scripts/debian11/s-adm-start b/scripts/debian11/s-adm-start new file mode 100644 index 0000000..c1b22f0 --- /dev/null +++ b/scripts/debian11/s-adm-start @@ -0,0 +1,15 @@ +#!/bin/bash +apt-get update +#apt upgrade -y; +mkdir -p tools/ansible +cd tools/ansible +git clone https://gitea.lyc-lecastel.fr/gadmin/gsb2023.git; +cd gsb2023/pre +bash inst-depl +cd /var/www/html/gsbstore +bash getall +cd /root/tools/ansible/gsb2023/pre +bash gsbboot +cd .. +bash pull-config +