Fixed code that was removed from initial-setup

This commit is contained in:
Gregory Ballantine 2024-04-23 13:10:46 -04:00
parent 3b10d7ee0f
commit 5a27129508

View File

@ -13,6 +13,21 @@ else
OS="freebsd"
fi
read -p 'System hostname: ' HOSTNAME
read -p 'System domain: ' DOMAIN
if [ "$OS" = 'freebsd' ]; then
# Configure system hostname
sysrc hostname="$HOSTNAME.$DOMAIN"
# Configure salt
echo "$HOSTNAME" > /usr/local/etc/salt/minion_id
sed -i .orig "s/\#master: salt/master: $SALT_MASTER/" /usr/local/etc/salt/minion
rm -rf /usr/local/etc/salt/pki
# Enable and start salt
sysrc salt_minion_enable="YES"
service salt_minion start
else
# Configure system hostname
hostnamectl set-hostname "$HOSTNAME"