From 836aa983101dc8afd84a1dbb55ee1e0783615a41 Mon Sep 17 00:00:00 2001 From: Timo Aaltonen Date: Wed, 12 Feb 2020 17:39:22 +0000 Subject: [PATCH] Fix the path to systemctl binary Gbp-Pq: Name fix-systemctl-path.diff --- ldap/admin/src/scripts/start-dirsrv.in | 2 +- ldap/admin/src/scripts/status-dirsrv.in | 4 ++-- ldap/admin/src/scripts/stop-dirsrv.in | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in index c1ed5f7..fcb1845 100755 --- a/ldap/admin/src/scripts/start-dirsrv.in +++ b/ldap/admin/src/scripts/start-dirsrv.in @@ -36,7 +36,7 @@ start_instance() { # otherwise start the instance the old way. # if [ -d "@systemdsystemunitdir@" ] && [ $(id -u) -eq 0 ];then - @bindir@/systemctl start @package_name@@$SERV_ID.service -l + /bin/systemctl start @package_name@@$SERV_ID.service -l if [ $? -ne 0 ]; then return 1 fi diff --git a/ldap/admin/src/scripts/status-dirsrv.in b/ldap/admin/src/scripts/status-dirsrv.in index 86b7d4a..4f2cb71 100755 --- a/ldap/admin/src/scripts/status-dirsrv.in +++ b/ldap/admin/src/scripts/status-dirsrv.in @@ -27,7 +27,7 @@ status_instance() { # Use systemctl if available. # if [ -d "@systemdsystemunitdir@" ] && [ $(id -u) -eq 0 ];then - @bindir@/systemctl status @package_name@@$SERV_ID.service -l --no-pager + /bin/systemctl status @package_name@@$SERV_ID.service -l --no-pager rv=$? if [ $rv -ne 0 ]; then return 1 @@ -69,7 +69,7 @@ if [ $# -eq 0 ]; then # Use systemctl if available and running as root, # if [ -d "@systemdsystemunitdir@" ] && [ $(id -u) -eq 0 ];then - @bindir@/systemctl status @package_name@@*.service -l --no-pager + /bin/systemctl status @package_name@@*.service -l --no-pager ret=$? if [ $? -ne 0 ]; then return 1 diff --git a/ldap/admin/src/scripts/stop-dirsrv.in b/ldap/admin/src/scripts/stop-dirsrv.in index 7c25034..ccc0511 100755 --- a/ldap/admin/src/scripts/stop-dirsrv.in +++ b/ldap/admin/src/scripts/stop-dirsrv.in @@ -27,12 +27,12 @@ stop_instance() { # # Now, check if systemctl is aware of this running instance # - @bindir@/systemctl is-active @package_name@@$SERV_ID.service > /dev/null 2>&1 + /bin/systemctl is-active @package_name@@$SERV_ID.service > /dev/null 2>&1 if [ $? -eq 0 ]; then # # systemctl sees the running process, so stop it correctly # - @bindir@/systemctl stop @package_name@@$SERV_ID.service -l + /bin/systemctl stop @package_name@@$SERV_ID.service -l else # # Have to kill it since systemctl doesn't think it's running -- 2.30.2