From f8f48cac43981920bb8e10eae158d11ac048f6b9 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 3 Jul 2023 16:00:21 +0200 Subject: [PATCH] Update mint.sh --- mint.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mint.sh b/mint.sh index beef223..84ed08f 100644 --- a/mint.sh +++ b/mint.sh @@ -1,18 +1,28 @@ #!/bin/bash -e +mydomain="ds9.dedyn.io" + echo "!!! ACHTUNG !!! Dieses Skript richtet Linux Mint nach bestimmten Vorgaben (größtenteils über Ansible Playbooks) ein und installiert neue Software Dies setzt auch die Eingabe des sudo/root-Passwortes voraus. Der Code kann hier eingesehen werden: -https://gitea.ds9.dedyn.io/olli/linux-mint +https://gitea.${mydomain}/olli/linux-mint Nutzung auf einene Gefahr!!! Nur mit Enter/Return fortfahren wenn dieses Skript wirklich von der oben erwähnten Quelle stammt und Vertrauen besteht. " whoami | grep -q ^root$ || read x +# domainname +if ! egrep -q "\.${mydomain}$" /etc/hostname +then + host=$(cat /etc/hostname | cut -d. -f1) + echo "${host}.${mydomain}" | sudo tee /etc/hostname +fi + + set -e set -x @@ -52,11 +62,12 @@ for playbook in debian.ansible.basics \ debian.ansible.dedyn.client do sudo rm -rf ${playbook} - git clone https://gitea.ds9.dedyn.io/olli/${playbook}.git + git clone https://gitea.${mydomain}/olli/${playbook}.git sudo ansible-playbook -e ansible_distribution=${DISTRIB_ID} -e ansible_distribution_release=${DISTRIB_CODENAME} --connection=local --inventory $(hostname), --limit $(hostname) ${playbook}/*.yml sudo rm -rf ${playbook} done + # Add User to docker group sudo usermod -aG docker $(whoami)