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:
@@ -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 "$@"
|
||||
Reference in New Issue
Block a user