Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rootfs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ RUN set -x && \
COPY . /

# Fix some permissions since we'll be running as a non-root user
RUN chown -R router:router /opt/router /var/log
RUN chown -R router:router /opt/router /var/log /www

USER router

Expand Down
9 changes: 9 additions & 0 deletions rootfs/opt/router/sbin/boot
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ set -eof pipefail
mkfifo -m 600 /tmp/logpipe
cat < /tmp/logpipe 1>&2 &

# set custom maintenance page on router startup.
# this can be specified via optional MAINTENANCE_PAGE_URL environment variable.

if [[ "$MAINTENANCE_PAGE_URL" == *".html" ]]; then
if ( curl -o/dev/null -sfI "$MAINTENANCE_PAGE_URL" ); then
curl -o /www/maintenance.html $MAINTENANCE_PAGE_URL;
fi;
fi;

exec /opt/router/sbin/router