Enhance customization script to optionally change server hostname and improve user prompts. Update setup script to copy customization script to sysadmin user's home directory, with fallback to download if local file is missing. Include new password notification for sysadmin user during setup.

This commit is contained in:
2025-09-20 15:43:06 +01:00
parent 037a59039a
commit 55dbf5e37c
2 changed files with 32 additions and 9 deletions

View File

@@ -39,6 +39,14 @@ set_hostname() {
echo -e "${BLUE}=== Server Hostname Configuration ===${NC}"
echo "Current hostname: $(hostname)"
echo ""
read -p "Do you want to change the hostname? (y/N): " change_hostname
if [[ ! "$change_hostname" =~ ^[Yy]$ ]]; then
log "Keeping current hostname: $(hostname)"
return 0
fi
read -p "Enter new hostname for this server: " new_hostname
if [[ -z "$new_hostname" ]]; then
@@ -223,7 +231,7 @@ show_deploy_instructions() {
main() {
echo -e "${BLUE}=== Server Customization Script ===${NC}"
echo "This script will:"
echo "1. Set server hostname"
echo "1. Optionally set server hostname"
echo "2. Create Git deploy keys"
echo "3. Configure SSH for Git repositories"
echo ""