Refactoring install
This commit is contained in:
22
.local/bin/station-setup-password
Executable file
22
.local/bin/station-setup-password
Executable file
@@ -0,0 +1,22 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo "-------------------------------------"
|
||||
echo "Password Setup Script"
|
||||
echo "-------------------------------------"
|
||||
|
||||
if gum confirm "Do you need to change your password?"; then
|
||||
while true; do
|
||||
if passwd; then
|
||||
echo "Password successfully updated."
|
||||
break
|
||||
else
|
||||
echo "Failed to update password."
|
||||
|
||||
if ! gum confirm "Would you like to try again?"; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Password change skipped."
|
||||
fi
|
||||
Reference in New Issue
Block a user