mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
syslog event script made conditional execution
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
ETC=/etc/rsyslog.conf
|
||||
if grep '/^#\*\.\* \?remote$' $ETC; then
|
||||
if grep -q '/^#\*\.\* \?remote$' $ETC; then
|
||||
sed -ri 's/^#(\*\.\* \?remote)$/\1/' $ETC
|
||||
/etc/rc.d/rc.rsyslogd restart &> /dev/null
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
ETC=/etc/rsyslog.conf
|
||||
if grep '/^\*\.\* \?remote$' $ETC; then
|
||||
if grep -q '/^\*\.\* \?remote$' $ETC; then
|
||||
sed -ri 's/^(\*\.\* \?remote)$/#\1/' $ETC
|
||||
/etc/rc.d/rc.rsyslogd restart &> /dev/null
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user