Created
March 22, 2021 10:57
-
-
Save valtoni/0d93b15653a19ea54674df2f200b3128 to your computer and use it in GitHub Desktop.
Output log to syslog in linux (init.d scripts)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original: https://serverfault.com/questions/341919/how-to-find-error-messages-from-linux-init-d-rc-d-scripts | |
# Reference: http://urbanautomaton.com/blog/2014/09/09/redirecting-bash-script-output-to-syslog/ | |
exec 1> >(logger -s -t $(basename $0)) 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment