Skip to content

Commit

Permalink
fix: jans-linux-setup remove apache config when uninstall (ref: #1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Jul 22, 2022
1 parent 061ab38 commit 6fe8e82
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions jans-linux-setup/jans_setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,18 @@ def uninstall_jans():
print("Executing", cmd)
os.system('rm -r -f ' + p)

apache_conf_fn_list = []

if shutil.which('zypper'):
apache_conf_fn_list = ['/etc/apache2/vhosts.d/_https_jans.conf']
elif shutil.which('yum') or shutil.which('dnf'):
apache_conf_fn_list = ['/etc/httpd/conf.d/https_jans.conf']
elif shutil.which('apt'):
apache_conf_fn_list = ['/etc/apache2/sites-enabled/https_jans.conf', '/etc/apache2/sites-available/https_jans.conf']

for fn in apache_conf_fn_list:
if os.path.exists(fn):
os.unlink(fn)

def upgrade():
check_installation()
Expand Down

0 comments on commit 6fe8e82

Please sign in to comment.