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 \ $*"