mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Began work on emailing service #1456
This commit is contained in:
27
docker/blocks/smtp/bootstrap.sh
Executable file
27
docker/blocks/smtp/bootstrap.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -u
|
||||
|
||||
# User params
|
||||
USER_PARAMS=$@
|
||||
|
||||
# Internal params
|
||||
RUN_CMD="snmpd -f ${USER_PARAMS}"
|
||||
|
||||
#######################################
|
||||
# Echo/log function
|
||||
# Arguments:
|
||||
# String: value to log
|
||||
#######################################
|
||||
log() {
|
||||
if [[ "$@" ]]; then echo "[`date +'%Y-%m-%d %T'`] $@";
|
||||
else echo; fi
|
||||
}
|
||||
|
||||
# Launch
|
||||
log $RUN_CMD
|
||||
$RUN_CMD
|
||||
|
||||
# Exit immidiately in case of any errors or when we have interactive terminal
|
||||
if [[ $? != 0 ]] || test -t 0; then exit $?; fi
|
||||
log
|
||||
Reference in New Issue
Block a user