azlux / log2ram

ramlog like for systemd (Put log into a ram folder)
MIT License
2.62k stars 193 forks source link

Output errors to stderror #187

Open LazeMSS opened 2 years ago

LazeMSS commented 2 years ago

Could the two installer.sh lines

systemctl -q is-active log2ram  && { echo "ERROR: log2ram service is still running. Please run \"sudo service log2ram stop\" to stop it."; exit 1; }
[ "$(id -u)" -eq 0 ] || { echo "You need to be ROOT (sudo can be used)"; exit 1; }

echo output to stderror:

systemctl -q is-active log2ram  && { echo "ERROR: log2ram service is still running. Please run \"sudo service log2ram stop\" to stop it." >&2; exit 1; }
[ "$(id -u)" -eq 0 ] || { echo "You need to be ROOT (sudo can be used)"  >&2; exit 1; }

Basically just append a >&2 to the echo commands