From 9639716333df313bfbd78b64a6e73a8dcb60d69a Mon Sep 17 00:00:00 2001 From: setiseta Date: Sun, 31 May 2015 13:48:05 +0200 Subject: [PATCH] Fixes init.sh --- README.md | 22 ++++------------------ init.sh | 10 ++++++++++ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8227f18..9912c91 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,10 @@ Observium ==== -Dockerfile for Observium with embedded MariaDB (MySQL) Database - Observium is an autodiscovering network monitoring platform supporting a wide range of hardware platforms and operating systems --- -###Forked from +###Originally forked from Zuhkov @@ -14,9 +12,7 @@ Zuhkov Usage example === ###Needed directories on host: -- config -- logs -- rrd +- data ``` docker run -d \ @@ -24,18 +20,8 @@ docker run -d \ -v /hostDir/logs:/opt/observium/logs \ -v /hostDir/rrd:/opt/observium/rrd \ -p 80:80 \ - -e POLLER=24 \ - --name observium \ - seti/observium -``` -###with custom timezone -``` -docker run -d \ - -v /hostDir/config:/config \ - -v /hostDir/logs:/opt/observium/logs \ - -v /hostDir/rrd:/opt/observium/rrd \ - -p 80:80 \ - -e TZ="America/Chicago" \ + -e TZ="Europe/Austria" \ + --link observium-db:mysql \ -e POLLER=24 \ --name observium \ seti/observium diff --git a/init.sh b/init.sh index af6092c..05d9a67 100644 --- a/init.sh +++ b/init.sh @@ -2,6 +2,16 @@ atd +if [ ! -f /data/config ]; then + mkdir /data/config +fi +if [ ! -f /data/rrd ]; then + mkdir /data/rrd +fi +if [ ! -f /data/logs ]; then + mkdir /data/logs +fi + # Check if PHP database config exists. If not, copy in the default config if [ -f /data/config/config.php ]; then echo "Using existing PHP database config file."