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:
10
costumize.sh
10
costumize.sh
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user