mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
Merge pull request #242 from whowutwut/rsyslog
Fix #218, Check file rsyslogd.pid before issuing kill on the pid
This commit is contained in:
commit
0c07cb84ae
@ -46,7 +46,12 @@ case "$1" in
|
||||
|
||||
/etc/init.d/apache2 restart
|
||||
|
||||
kill -HUP $(</var/run/rsyslogd.pid) >/dev/null 2>&1 || :
|
||||
# Let rsyslogd perform close of any open files
|
||||
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)
|
||||
|
@ -201,8 +201,12 @@ then
|
||||
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf
|
||||
fi
|
||||
|
||||
# Lets rsyslogd perform close all open files
|
||||
kill -HUP $(</var/run/rsyslogd.pid) >/dev/null 2>&1 || :
|
||||
# Let rsyslogd perform close of any open files
|
||||
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
|
||||
|
@ -156,6 +156,13 @@ if [ -n "$version" ]; then
|
||||
fi
|
||||
|
||||
|
||||
# Let rsyslogd perform close of any open files
|
||||
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 and move the original ones from /tmp/xcat to /var/run/xcat
|
||||
|
Loading…
x
Reference in New Issue
Block a user