Skip to content

Commit

Permalink
Fix persistent log (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli committed Jul 2, 2018
1 parent 90dc5b5 commit 6fdd892
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion buildroot-external/rootfs-overlay/usr/sbin/hassos-config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ -d /mnt/config/network ]; then

rm -rf /etc/NetworkManager/system-connections/*
cp -f /mnt/config/network/* /etc/NetworkManager/system-connections/
chmod 664 /etc/NetworkManager/system-connections/*
chmod 600 /etc/NetworkManager/system-connections/*

nmcli con reload
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ set -e
MACHINE_ID=$(cat /etc/machine-id)
CURRENT_LOGS=/var/log/journal/${MACHINE_ID}

# Cleanup
if [ ! -d ${CURRENT_LOGS} ]; then
rm -rf /var/log/journal/*
exit 0
fi

# Loop all logs folder and move
for log_folder in /var/log/journal/*; do
# Not a log folder
Expand All @@ -22,8 +16,6 @@ for log_folder in /var/log/journal/*; do
continue
fi

mv ${log_folder}/* ${CURRENT_LOGS}/
rm -rf ${log_folder}
done

journalctl --vacuum-size=20M

0 comments on commit 6fdd892

Please sign in to comment.