Tuesday, March 25, 2014

Arch Linux enable / disable journal logging


Create script to enable disable journal logging.
To prevent SD card wearing on RaspberryPi  I've decided to take control of journal logging.

start_loging_journal.sh

#!/bin/bash
sed -i '/Storage=none/d'  /etc/systemd/journald.conf
systemctl restart systemd-journald

stop_loging_journal.sh

#!/bin/bash
sed -i '/Storage=none/d'  /etc/systemd/journald.conf
echo "Storage=none" >> /etc/systemd/journald.conf
systemctl restart systemd-journald