Implement self-deletion of setup and customization scripts after successful execution. Enhance user password setting process with retry logic for both sysadmin and additional users, improving error handling and user feedback during setup.

This commit is contained in:
2025-09-07 21:34:37 +01:00
parent a25d98fdeb
commit 0083186826
2 changed files with 46 additions and 6 deletions

View File

@@ -247,6 +247,11 @@ main() {
echo ""
echo -e "${GREEN}Server customization completed!${NC}"
echo -e "${YELLOW}You may need to log out and back in to see the hostname change.${NC}"
# Self-delete the script after successful completion
log "Cleaning up customization script..."
rm -f "$0"
log "Customization script deleted successfully"
}
main "$@"