mirror of
https://github.com/grafana/grafana.git
synced 2026-07-29 15:59:50 -05:00
Began work on emailing service #1456
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
FROM centos:centos7
|
||||
MAINTAINER Przemyslaw Ozgo <linux@ozgo.info>
|
||||
|
||||
RUN \
|
||||
yum update -y && \
|
||||
yum install -y net-snmp net-snmp-utils && \
|
||||
yum clean all
|
||||
|
||||
COPY bootstrap.sh /tmp/bootstrap.sh
|
||||
|
||||
EXPOSE 161
|
||||
|
||||
ENTRYPOINT ["/tmp/bootstrap.sh"]
|
||||
Executable
+27
@@ -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
|
||||
@@ -0,0 +1,4 @@
|
||||
snmpd:
|
||||
build: blocks/snmpd
|
||||
ports:
|
||||
- "161:161"
|
||||
Reference in New Issue
Block a user