From 189bf9c6443ae0681fc73828f5191c78f800973f Mon Sep 17 00:00:00 2001 From: meliurwen Date: Wed, 5 Jan 2022 13:51:05 +0100 Subject: [PATCH] pidfile now is handled correctly in solanum container and small fix in build stage --- solanum/Dockerfile | 3 ++- solanum/root/entrypoint.sh | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/solanum/Dockerfile b/solanum/Dockerfile index 250ce8f..44a0995 100644 --- a/solanum/Dockerfile +++ b/solanum/Dockerfile @@ -34,7 +34,8 @@ RUN ./configure \ RUN apk add \ util-linux RUN make -j${MK_THREADS:-$(nproc)} && \ - make install + make install && \ + mv /srv/data/* /srv/solanum/ FROM alpine:latest diff --git a/solanum/root/entrypoint.sh b/solanum/root/entrypoint.sh index ead675e..8f78cd3 100755 --- a/solanum/root/entrypoint.sh +++ b/solanum/root/entrypoint.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -e + mkdir -p /srv/data/etc /srv/data/logs chown solanum:solanum -R /srv/data/logs @@ -7,7 +9,27 @@ chown solanum:solanum -R /srv/data/logs cp -n -p /srv/solanum/etc/ircd.conf.example /srv/data/etc/ircd.conf cp -n -p /srv/solanum/etc/ircd.motd /srv/data/etc/ircd.motd +# Usage: solanum [options] +# Where valid options are: +# -configfile File to use for ircd.conf +# -logfile File to use for ircd.log +# -pidfile File to use for process ID +# -foreground Run in foreground (don't detach) +# -version Print version and exit +# -conftest Test the configuration files and exit +# -help Print this text + +rm -f /srv/solanum/ircd.pid + +# Validate the configuration first +# Note: ehm... it returns exit code 0 regardless of the result?? +#su solanum \ +# -c "/srv/solanum/bin/solanum \ +# -pidfile /srv/solanum/ircd.pid \ +# -conftest" + su solanum \ -c "/srv/solanum/bin/solanum \ + -pidfile /srv/solanum/ircd.pid \ -foreground \ $*"