Skip to content

Commit

Permalink
Create rw if not exist on Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat5TV committed Aug 21, 2019
1 parent db11b78 commit 98e4288
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build/045-nagios
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions notes/docker/stages/01/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down

0 comments on commit 98e4288

Please sign in to comment.