From d22800edd523a020f94de80869b7342f6d358e39 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 21 Apr 2020 11:05:29 -0600 Subject: [PATCH] Only remove the systemd unit service file if we copied it manually. If the service file was installed as part of the package it will be removed automatically when the package is uninstalled. --- scripts/pp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/pp b/scripts/pp index ccddbc10b..e30785d94 100755 --- a/scripts/pp +++ b/scripts/pp @@ -1,6 +1,6 @@ #!/bin/sh # Copyright 2020 One Identity LLC. ALL RIGHTS RESERVED -pp_revision="20200416" +pp_revision="20200421" # Copyright 2018 One Identity LLC. ALL RIGHTS RESERVED. # # Redistribution and use in source and binary forms, with or without @@ -8920,9 +8920,7 @@ pp_systemd_service_install_common () { if test -x "$systemctl_cmd" && test -d "$systemd_system_conf_dir/$systemd_target_wants"; then # If our service file still exists (upgrade) remove the link/file and systemctl # will recreate it if/when we enable the $svc service. - if test -e "$systemd_system_conf_dir/$systemd_target_wants/$svc.service" ; then - rm -f "$systemd_system_conf_dir/$systemd_target_wants/$svc.service" - fi + rm -f "$systemd_system_conf_dir/$systemd_target_wants/$svc.service" # Copy the $svc.service file to the correct systemd_system_unit_dir location if [ "x$systemd_service_dir" != "x$systemd_system_unit_dir" ]; then @@ -9030,7 +9028,7 @@ pp_systemd_service_remove_common () { fi # Remove the systemd unit service file - if test -e "$systemd_system_unit_dir/$svc.service"; then + if [ "x$systemd_service_dir" != "x$systemd_system_unit_dir" ]; then rm -f "$systemd_system_unit_dir/$svc.service" fi