def uninstall(opts): for src, dst in getlinks(): environment.debug(opts, 'removing link: %s' % dst) if not os.path.islink(dst): environment.debug(opts, '%s does not exist, skipping' % dst) continue os.unlink(dst) environment.uninstall_files(get_paths_to_copy(), opts) # Link between pulp and apache if os.path.exists('/var/www/pub'): os.unlink('/var/www/pub') # Old link between pulp and apache, make sure it's cleaned up if os.path.exists('/var/www/html/pub'): os.unlink('/var/www/html/pub') # Remove generated certificates print 'removing certificates' os.system('rm -rf /etc/pki/pulp/*') # Remove the Python packages environment.manage_setup_pys('uninstall') if LSB_VERSION >= 6.0: # Reload systemd unit files os.system('systemctl daemon-reload') return os.EX_OK
def uninstall(opts): for src, dst in getlinks(): environment.debug(opts, 'removing link: %s' % dst) if not os.path.islink(dst): environment.debug(opts, '%s does not exist, skipping' % dst) continue os.unlink(dst) environment.uninstall_files(get_paths_to_copy(), opts) # Link between pulp and apache if os.path.exists('/var/www/pub'): os.unlink('/var/www/pub') # Old link between pulp and apache, make sure it's cleaned up if os.path.exists('/var/www/html/pub'): os.unlink('/var/www/html/pub') # Remove generated certificates print 'removing certificates' os.system('rm -rf /etc/pki/pulp/*') # Remove the Python packages environment.manage_setup_pys('uninstall') return os.EX_OK