#!/bin/sh
#180420 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  && kill -1 `pidof systemd-journald`
    $0 status
    ;;
 stop)
    sed -i 's/#\?Storage=auto/Storage=none/' /etc/systemd/journald.conf  && kill -1 `pidof systemd-journald`
    $0 status
    ;;
 *) 
    echo "Usage:
    $0 start|stop|status"
esac
