Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: jans-linux-setup uninstall does not prompt with -n #887

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions jans-linux-setup/jans_setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,22 +316,23 @@ def prepare_jans_cli_package():

def uninstall_jans():
check_installation()
print('\033[31m')
print("This process is irreversible.")
print("You will lose all data related to Janssen Server.")
print('\033[0m')
print()
while True:
print('\033[31m \033[1m')
response = input("Are you sure to uninstall Janssen Server? [yes/N] ")
if not argsp.n:
print('\033[31m')
print("This process is irreversible.")
print("You will lose all data related to Janssen Server.")
print('\033[0m')
if response.lower() in ('yes', 'n', 'no'):
if not response.lower() == 'yes':
sys.exit()
print()
while True:
print('\033[31m \033[1m')
response = input("Are you sure to uninstall Janssen Server? [yes/N] ")
print('\033[0m')
if response.lower() in ('yes', 'n', 'no'):
if not response.lower() == 'yes':
sys.exit()
else:
break
else:
break
else:
print("Please type \033[1m yes \033[0m to uninstall")
print("Please type \033[1m yes \033[0m to uninstall")

print("Uninstalling Jannsen Server...")
for service in jetty_services:
Expand Down