Skip to content
Permalink
Browse files

Create rw if not exist on Docker

  • Loading branch information...
Cat5TV committed Aug 21, 2019
1 parent db11b78 commit 98e4288c02a82d9412168cdb19b0066929afc125
Showing with 14 additions and 2 deletions.
  1. +10 −2 build/045-nagios
  2. +4 −0 notes/docker/stages/01/Dockerfile
@@ -69,7 +69,15 @@ fi
/bin/systemctl daemon-reload

if [[ ! -d /usr/local/nagios/var/rw ]]; then
echo "Something went wrong. The rw folder doesn't exist even after script completion."
exit 1
platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
if (( $platform != 21 )); then
echo "Something went wrong. The rw folder doesn't exist even after script completion."
exit 1
else
# Docker
mkdir -p /usr/local/nagios/var/rw
chown nagios:nagios /usr/local/nagios/var/rw
fi
fi

exit 0
@@ -20,6 +20,10 @@ RUN apt-get update && \

# Setup faux systemd environment
RUN apt-get remove --purge systemd && \
echo "Package: systemd
Pin: release *
Pin-Priority: -1
" > /etc/apt/preferences && \
wget -O /tmp/systemctl.zip https://github.com/gdraheim/docker-systemctl-replacement/archive/v1.4.3000.zip && \
cd /tmp && \
unzip systemctl.zip && \

0 comments on commit 98e4288

Please sign in to comment.
You can’t perform that action at this time.