#!/bin/sh
#131105 sfs
case "$1" in 
 status)
    [ ! "`egrep '^Storage=none' /etc/systemd/journald.conf`" ] && echo "журнал включен" || echo "журнал выключен"
    journalctl --disk-usage
    ;;
 start)
    sed -i 's/Storage=none/Storage=auto/' /etc/systemd/journald.conf  && killall -1 systemd-journald
    $0 status
    ;;
 stop)
    sed -i 's/Storage=auto/Storage=none/' /etc/systemd/journald.conf  && killall -1 systemd-journald
    $0 status
    ;;
 *) 
    echo "Usage:
    $0 start|stop|status"
esac
