Chris Hagood 2 년 전
부모
커밋
e0f4cca271
3개의 변경된 파일21개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      Cleanup.sh
  2. 18 0
      Template/22_04template.sh
  3. 2 1
      config.sh

+ 1 - 1
Cleanup.sh

@@ -3,4 +3,4 @@
 set -e
 
 # Delete setup files
-sudo rm config.sh UbuntuJoinDomain.sh Static.sh dhcp.sh Cleanup.sh
+sudo rm config.sh UbuntuJoinDomain.sh Static.sh dhcp.sh 22_04template.sh Cleanup.sh

+ 18 - 0
Template/22_04template.sh

@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e
+
+# Install updates
+sudo apt-get update
+sudo apt-get upgrade -y
+
+# Reset hostname
+sudo sed -i 's/preserve_hostname: false/preserve_hostname: true/g' /etc/cloud/cloud.cfg
+sudo truncate -s0 /etc/hostname
+sudo hostnamectl set-hostname localhost
+
+# Delete network config
+sudo rm /etc/netplan/*.*
+
+# Clean shell history
+cat /dev/null > ~/.bash_history && history -c

+ 2 - 1
config.sh

@@ -9,4 +9,5 @@ NEW_HOSTNAME="newhostname.peo.local"
 HOST="hostname"
 DOMAIN="peo.local"
 #DOMAIN_DESC="My domain description"
-OU="Paste destination OU"
+OU="Paste destination OU"
+# Ignore me