-
-
Notifications
You must be signed in to change notification settings - Fork 378
Expand file tree
/
Copy pathjournalctl
More file actions
22 lines (16 loc) · 590 Bytes
/
journalctl
File metadata and controls
22 lines (16 loc) · 590 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function f_journalctl {
echo "[$SCRIPT_COUNT] Systemd/journald.conf and logrotate.conf"
cp "$LOGROTATE_CONF" "$LOGROTATE"
sed -i 's/^#Storage=.*/Storage=persistent/' "$JOURNALDCONF"
sed -i 's/^#ForwardToSyslog=.*/ForwardToSyslog=yes/' "$JOURNALDCONF"
sed -i 's/^#Compress=.*/Compress=yes/' "$JOURNALDCONF"
systemctl restart systemd-journald
if [ -w "$RSYSLOGCONF" ]; then
sed -i "s/^\$FileCreateMode.*/\$FileCreateMode 0600/g" "$RSYSLOGCONF"
fi
if [[ $VERBOSE == "Y" ]]; then
systemctl status systemd-journald --no-pager
echo
fi
((SCRIPT_COUNT++))
}