Skip to content

Commit

Permalink
fix: jans-linux-setup remove apache config when uninstall (#1844)
Browse files Browse the repository at this point in the history
* fix: jans-linux-setup remove apache config when uninstall (ref: #1809)

* fix: jans-linux-setup verbose removing apache config file
  • Loading branch information
devrimyatar committed Jul 22, 2022
1 parent ee3a064 commit 4a5bc3e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 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,19 @@ 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):
print("Removing", fn)
os.unlink(fn)

def upgrade():
check_installation()
Expand Down

0 comments on commit 4a5bc3e

Please sign in to comment.