diff --git a/reset-password-for-casaos/run.sh b/reset-password-for-casaos/run.sh index 6e44658..b4c543c 100644 --- a/reset-password-for-casaos/run.sh +++ b/reset-password-for-casaos/run.sh @@ -1,6 +1,12 @@ #!/bin/bash # This script allows the user to reset their CasaOS username and password. +# Check if the casaos.service is active +if ! systemctl is-active --quiet casaos.service; then + echo "CasaOS service is not active. Exiting." + exit 1 +fi + # Prompt user for confirmation read -p "Do you want to reset your CasaOS username and password? (y/n): " response