Fix persistent log (#70)

This commit is contained in:
Pascal Vizeli 2018-07-02 23:53:07 +02:00 committed by Pascal Vizeli
parent 90dc5b54c0
commit 6fdd892aaf
2 changed files with 1 additions and 9 deletions

View File

@ -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

View File

@ -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
@ -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