Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust init-permission/run to finish correctly on qnap #252

Closed
wants to merge 3 commits into from
Closed
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
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ init_diagram: |
"bookstack:latest" <- Base Images
# changelog
changelogs:
- {date: "04.01.25:", desc: "Adjust init-permissions to support qnap"}
- {date: "17.12.24:", desc: "Rebase to Alpine 3.21."}
- {date: "11.10.24:", desc: "Default to environment config over .env file config."}
- {date: "06.09.24:", desc: "Add php-exif for reading image EXIF data."}
Expand Down
30 changes: 30 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-permissions/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
# permissions
lsiown -R abc:abc \
/var/lib/nginx

chmod -R 644 /etc/logrotate.d
fi

if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
lsiown -R abc:abc \
/config/keys \
/config/log \
/config/nginx \
/config/php

lsiown abc:abc \
/config/www
fi

if [[ -f "/config/log/logrotate.status" ]]; then
chmod 600 /config/log/logrotate.status
fi

chmod -R g+w \
/config/nginx

true
Loading