2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

The file is syslogd.pid on older systems, causing the error 'File not found'

This commit is contained in:
Victor Hu 2015-10-01 16:35:16 -04:00
parent 136b9319f3
commit 21d8eeef1c
2 changed files with 10 additions and 2 deletions

View File

@ -46,7 +46,11 @@ case "$1" in
/etc/init.d/apache2 restart
kill -HUP $(</var/run/rsyslogd.pid) >/dev/null 2>&1 || :
if [ -e /var/run/rsyslogd.pid ]; then
kill -HUP $(</var/run/rsyslogd.pid) >/dev/null 2>&1 || :
elif [ -e /var/run/syslogd.pid ]; then
kill -HUP $(</var/run/syslogd.pid) >/dev/null 2>&1 || :
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)

View File

@ -202,7 +202,11 @@ then
fi
# Lets rsyslogd perform close all open files
kill -HUP $(</var/run/rsyslogd.pid) >/dev/null 2>&1 || :
if [ -e /var/run/rsyslogd.pid ]; then
kill -HUP $(</var/run/rsyslogd.pid) >/dev/null 2>&1 || :
elif [ -e /var/run/syslogd.pid ]; then
kill -HUP $(</var/run/syslogd.pid) >/dev/null 2>&1 || :
fi
%endif
# create dir for the current pid