diff --git a/rsyslog.service b/rsyslog.service index 9c13b1d0f0e99952c7b553181bd85909665add18..e10124fb9e146685355caa0be5abe7e41c9af186 100644 --- a/rsyslog.service +++ b/rsyslog.service @@ -1,6 +1,8 @@ [Unit] Description=System Logging Service ;Requires=syslog.socket +Wants=network.target network-online.target +After=network.target network-online.target Documentation=man:rsyslogd(8) Documentation=https://www.rsyslog.com/doc/ @@ -8,15 +10,14 @@ Documentation=https://www.rsyslog.com/doc/ Type=notify EnvironmentFile=-/etc/sysconfig/rsyslog ExecStart=/usr/sbin/rsyslogd -n $SYSLOGD_OPTIONS -ExecReload=/usr/bin/kill -HUP $MAINPID +Restart=on-failure UMask=0066 StandardOutput=null Restart=on-failure - # Increase the default a bit in order to allow many simultaneous # files to be monitored, we might need a lot of fds. LimitNOFILE=16384 [Install] WantedBy=multi-user.target -;Alias=syslog.service +;Alias=syslog.service \ No newline at end of file diff --git a/rsyslog.spec b/rsyslog.spec index 16f6d06d4fc9f9b8043143c94fe38e0de6524d4f..25197e588bc4ce228b06a36ad04e53cf405c9e6c 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -4,7 +4,7 @@ Name: rsyslog Version: 8.2012.0 -Release: 2 +Release: 3 Summary: The rocket-fast system for log processing License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ @@ -358,6 +358,12 @@ done %{_mandir}/man1/rscryutil.1.gz %changelog +* Wed Aug 25 2021 wuchaochao - 8.2012.0-3 +- Type:NA +- ID:NA +- SUG:restart +- DESC:add RSYSLOG_OPTIONS and organize rsyslog.service files + * Fri Jun 11 2021 shangyibin - 8.2012.0-2 - Type:NA - ID:NA diff --git a/rsyslog.sysconfig b/rsyslog.sysconfig index bc65731bfc46ec54cb07434a2b10bc6469d971c5..2ad4c06bcc948ec884a80315de54a8e5b87a1776 100644 --- a/rsyslog.sysconfig +++ b/rsyslog.sysconfig @@ -2,4 +2,4 @@ # Syslogd options are deprecated since rsyslog v3. # If you want to use them, switch to compatibility mode 2 by "-c 2" # See rsyslogd(8) for more details -SYSLOGD_OPTIONS="" +SYSLOGD_OPTIONS="-i/var/run/rsyslogd.pid"