2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-05-22 08:42:47 +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:
Xiaopeng Wang
2015-10-13 21:33:10 +08:00
3 changed files with 19 additions and 3 deletions
+6 -1
View File
@@ -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)
+6 -2
View File
@@ -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
+7
View File
@@ -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