Fix persistent log (#70)

This commit is contained in:
Pascal Vizeli 2018-07-02 23:53:07 +02:00 committed by GitHub
parent c860229130
commit 7e665a7b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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/* rm -rf /etc/NetworkManager/system-connections/*
cp -f /mnt/config/network/* /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 nmcli con reload
fi fi

View File

@ -4,12 +4,6 @@ set -e
MACHINE_ID=$(cat /etc/machine-id) MACHINE_ID=$(cat /etc/machine-id)
CURRENT_LOGS=/var/log/journal/${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 # Loop all logs folder and move
for log_folder in /var/log/journal/*; do for log_folder in /var/log/journal/*; do
# Not a log folder # Not a log folder
@ -22,8 +16,6 @@ for log_folder in /var/log/journal/*; do
continue continue
fi fi
mv ${log_folder}/* ${CURRENT_LOGS}/
rm -rf ${log_folder} rm -rf ${log_folder}
done done
journalctl --vacuum-size=20M