2 Commits

Author SHA1 Message Date
Jay Larson
960542dcbd corrected logrotate config for rsyslog to send -HUP after log rotation 2018-09-30 17:08:58 -05:00
Jay Larson
4aabf9ebb2 The following changes were made:
* Moved to new CONFIG directory
  * Updated init script to exit non zero if status shows nothing running
2018-07-31 15:01:22 -05:00
5 changed files with 5 additions and 18 deletions

View File

@@ -7,7 +7,7 @@
delaycompress delaycompress
compress compress
postrotate postrotate
invoke-rc.d rsyslog rotate > /dev/null /etc/init.d/rsyslog reload > /dev/null
endscript endscript
} }
@@ -32,6 +32,6 @@
delaycompress delaycompress
sharedscripts sharedscripts
postrotate postrotate
invoke-rc.d rsyslog rotate > /dev/null /etc/init.d/rsyslog reload > /dev/null
endscript endscript
} }

View File

@@ -69,7 +69,7 @@ URL = https://www.rsyslog.com/
REPO = main REPO = main
BRIEF = RSYSLOG is the rocket-fast system for log processing BRIEF = RSYSLOG is the rocket-fast system for log processing
DESC = RSYSLOG is the rocket-fast system for log processing DESC = RSYSLOG is the rocket-fast system for log processing
SNAPVER = 1 SNAPVER = 3
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -129,12 +129,7 @@ $(ROOT): $(SRCDIR)/tools/rsyslogd
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
install -v -d -m 0755 $(ROOT)/etc/init.d && \ install -v -d -m 0755 $(ROOT)/etc/init.d && \
install -v -d -m 0755 $(ROOT)/etc/rsyslog.d && \ install -v -d -m 0755 $(ROOT)/etc/rsyslog.d && \
install -v -d -m 0755 $(ROOT)/usr/share/$(PACKAGE) && \
install -v -d -m 0755 $(ROOT)/var/spool/rsyslog && \ install -v -d -m 0755 $(ROOT)/var/spool/rsyslog && \
install -v -m 0644 $(SNAPDIR)/rsyslog.conf \
$(ROOT)/usr/share/$(PACKAGE)/rsyslog.conf && \
install -v -m 0644 $(SNAPDIR)/rsyslog.logrotate \
$(ROOT)/usr/share/$(PACKAGE)/rsyslog.logrotate && \
install -v -m 0755 $(SNAPDIR)/rsyslog.init \ install -v -m 0755 $(SNAPDIR)/rsyslog.init \
$(ROOT)/etc/init.d/rsyslog $(ROOT)/etc/init.d/rsyslog
@@ -147,5 +142,6 @@ clean:
$(SNAPINFO) \ $(SNAPINFO) \
$(MANIFEST) \ $(MANIFEST) \
$(FILES) \ $(FILES) \
$(CONFIG) \
$(SRCDIR) $(SRCDIR)

View File

@@ -37,9 +37,8 @@ case "$1" in
sleep 1 sleep 1
$0 start $0 start
;; ;;
status) status)
status_of_proc -p "$PIDFILE" "$DAEMON" status_of_proc -p "$PIDFILE" "$DAEMON" || exit 1
;; ;;
*) *)
echo "Usage: $0 [start|stop|reload|restart|status]" echo "Usage: $0 [start|stop|reload|restart|status]"

View File

@@ -7,14 +7,6 @@ case $1 in
exit 0 exit 0
;; ;;
postinst) postinst)
if [ ! -f /etc/rsyslog.conf ]; then
cp /usr/share/rsyslog/rsyslog.conf /etc/rsyslog.conf
fi
if [ ! -f /etc/logrotate.d/rsyslog ]; then
cp /usr/share/rsyslog/rsyslog.logrotate /etc/logrotate.d/rsyslog
fi
/etc/init.d/rsyslog status 2>&1 > /dev/null && /etc/init.d/rsyslog restart /etc/init.d/rsyslog status 2>&1 > /dev/null && /etc/init.d/rsyslog restart
exit 0 exit 0