mirror of
https://github.com/spiritLHLS/one-click-installation-script.git
synced 2024-11-16 13:42:19 +08:00
Update resize_journal.sh
This commit is contained in:
parent
f0c1fedafd
commit
e77c5976f9
|
@ -88,10 +88,10 @@ main() {
|
||||||
# Check if the line containing ForwardToSyslog is commented out
|
# Check if the line containing ForwardToSyslog is commented out
|
||||||
if grep -q '^#\s*ForwardToSyslog=' /etc/systemd/journald.conf; then
|
if grep -q '^#\s*ForwardToSyslog=' /etc/systemd/journald.conf; then
|
||||||
# If it is commented out, uncomment it and set the value to no
|
# If it is commented out, uncomment it and set the value to no
|
||||||
sed -i "s/^#\s*ForwardToSyslog=.*/ForwardToSyslog=no/g" /etc/systemd/journald.conf
|
sed -i "s/^#\s*ForwardToSyslog=no.*/ForwardToSyslog=no/g" /etc/systemd/journald.conf
|
||||||
else
|
else
|
||||||
# If it is not commented out, just update the value
|
# If it is not commented out, just update the value
|
||||||
sed -i "s/^ForwardToSyslog=.*/ForwardToSyslog=no/g" /etc/systemd/journald.conf
|
sed -i "s/^ForwardToSyslog=no.*/ForwardToSyslog=no/g" /etc/systemd/journald.conf
|
||||||
fi
|
fi
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to set ForwardToSyslog to no in journald.conf"
|
echo "Failed to set ForwardToSyslog to no in journald.conf"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user