mint.sh aktualisiert

This commit is contained in:
olli 2023-07-18 14:02:12 +02:00
parent f39abc2a96
commit 574ede4b79

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
mydomain="mint.ds9.dedyn.io" mydomain="ds9.dedyn.io"
echo "!!! ACHTUNG !!! echo "!!! ACHTUNG !!!
@ -16,7 +16,7 @@ Nutzung auf einene Gefahr!!! Nur mit Enter/Return fortfahren wenn dieses Skript
whoami | grep -q ^root$ || read x whoami | grep -q ^root$ || read x
# domainname # domainname
if ! egrep -q "\.${mydomain}$" /etc/hostname if ! egrep -q "\.mint.${mydomain}$" /etc/hostname
then then
# remove old whoogle path if available # remove old whoogle path if available
if [ -d /home/docker/whoogle.$(hostname) ] if [ -d /home/docker/whoogle.$(hostname) ]
@ -26,7 +26,7 @@ then
fi fi
host=$(cat /etc/hostname | cut -d. -f1) host=$(cat /etc/hostname | cut -d. -f1)
#echo "${host}.${mydomain}" | sudo tee /etc/hostname #echo "${host}.${mydomain}" | sudo tee /etc/hostname
hostnamectl set-hostname ${host}.${mydomain} hostnamectl set-hostname ${host}.mint.${mydomain}
fi fi
# fix for creating notify.sh dir from docker start if file not present # fix for creating notify.sh dir from docker start if file not present