Dateien nach "template" hochladen
This commit is contained in:
parent
99baa35d0a
commit
d49f449f2e
48
template/change_hostname.sh
Normal file
48
template/change_hostname.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Current Hostname
|
||||
CHOST=$(hostname)
|
||||
|
||||
# Search parameters
|
||||
DEFNAME=template
|
||||
DEFDOM=local.tld
|
||||
|
||||
errormsg() {
|
||||
echo "Bitte Hostnamen und Domain angeben: $0 <hostname> <domain>"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# check hostname
|
||||
if [[ -z "$1" ]]; then
|
||||
errormsg
|
||||
else
|
||||
HNAME=$1
|
||||
fi
|
||||
|
||||
# check domain
|
||||
if [[ -z "$2" ]]; then
|
||||
errormsg
|
||||
else
|
||||
DOMNAME=$2
|
||||
fi
|
||||
|
||||
# Domain
|
||||
FQDN=${HNAME}.${DOMNAME}
|
||||
|
||||
# Status:
|
||||
echo "------------------------------------------------------"
|
||||
echo "Aktueller Hostname (hostname -f): $(hostname -f)"
|
||||
echo " (cat /etc/hostname): $(cat /etc/hostname)"
|
||||
echo "Ersetzungs-Suchmuster : ${DEFNAME}.${DEFDOM}"
|
||||
echo "neuer Hostname : ${FQDN}"
|
||||
echo "------------------------------------------------------"
|
||||
echo
|
||||
echo "<press Enter>"
|
||||
read
|
||||
|
||||
sed -i -e "s/${DEFNAME}.${DEFDOM}/${FQDN}/g" /etc/exim4/update-exim4.conf.conf
|
||||
sed -i -e "s/${DEFNAME}.${DEFDOM}/${FQDN}/g" /etc/hosts
|
||||
sed -i -e "s/${DEFNAME}/${HNAME}/g" /etc/hosts
|
||||
sed -i -e "s/${DEFNAME}.${DEFDOM}/${FQDN}/g" /etc/mailname
|
||||
sed -i -e "s/${DEFNAME}/${HNAME}/g" /etc/hostname
|
||||
|
25
template/initDocker.sh
Normal file
25
template/initDocker.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
apt update
|
||||
apt install -y curl
|
||||
|
||||
DOCKERDIR=/docker
|
||||
|
||||
mkdir -p $DOCKERDIR
|
||||
ln $DOCKERDIR /root/docker -s
|
||||
curl -k -o $DOCKERDIR/setupDocker.sh https://get.docker.com
|
||||
chmod +x $DOCKERDIR/setupDocker.sh
|
||||
|
||||
echo "
|
||||
------------------------------------------------------------------------------
|
||||
Docker Einrichtung:
|
||||
|
||||
Docker Verzeichnis : /docker -> Symbolischer Link in /root!
|
||||
Docker install-Skript: /docker/setupDocker.sh -> Install-/Updateskript
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
"
|
||||
|
||||
|
||||
|
||||
|
9
template/install_cockpit.sh
Normal file
9
template/install_cockpit.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" > /etc/apt/sources.list.d/backports.list
|
||||
|
||||
apt update ; apt install -t ${VERSION_CODENAME}-backports cockpit
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user