|
|
@ -9,11 +9,6 @@ fi
|
|
|
|
# Options.
|
|
|
|
# Options.
|
|
|
|
DATADIR="/znc-data"
|
|
|
|
DATADIR="/znc-data"
|
|
|
|
|
|
|
|
|
|
|
|
# Make sure $DATADIR is owned by znc user. This affects ownership of the
|
|
|
|
|
|
|
|
# mounted directory on the host machine too.
|
|
|
|
|
|
|
|
chown -R znc:znc "$DATADIR" || exit 1
|
|
|
|
|
|
|
|
chmod 700 "$DATADIR" || exit 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This file is added by znc:full image
|
|
|
|
# This file is added by znc:full image
|
|
|
|
if [ -r /znc-build-modules.sh ]; then
|
|
|
|
if [ -r /znc-build-modules.sh ]; then
|
|
|
|
source /znc-build-modules.sh || exit 3
|
|
|
|
source /znc-build-modules.sh || exit 3
|
|
|
@ -21,6 +16,12 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
cd /
|
|
|
|
cd /
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make sure $DATADIR is owned by znc user. This affects ownership of the
|
|
|
|
|
|
|
|
# mounted directory on the host machine too.
|
|
|
|
|
|
|
|
chown -R znc:znc "$DATADIR" || exit 1
|
|
|
|
|
|
|
|
chmod 700 "$DATADIR" || exit 2
|
|
|
|
|
|
|
|
|
|
|
|
# ZNC itself responds to SIGTERM, and reaps its children, but whatever was
|
|
|
|
# ZNC itself responds to SIGTERM, and reaps its children, but whatever was
|
|
|
|
# started via *shell module is not guaranteed to reap their children.
|
|
|
|
# started via *shell module is not guaranteed to reap their children.
|
|
|
|
exec /sbin/tini -- /opt/znc/bin/znc --foreground --datadir "$DATADIR" "$@"
|
|
|
|
# That's why using tini.
|
|
|
|
|
|
|
|
exec /sbin/tini -- sudo --user znc /opt/znc/bin/znc --foreground --datadir "$DATADIR" "$@"
|
|
|
|