mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-27 03:31:46 +00:00
update docker image
This commit is contained in:
parent
3e15e09c07
commit
c56a3b8fdf
3 changed files with 99 additions and 19 deletions
13
root/etc/cont-init.d/30-config
Normal file
13
root/etc/cont-init.d/30-config
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# make config & metadata folder
|
||||
mkdir -p \
|
||||
/config/ \
|
||||
/metadata/
|
||||
|
||||
# chown config & metadata directories if currently not set to abc
|
||||
if [[ -d /config ]] && [[ "$(stat -c '%U' /config)" != "abc" ]]; then
|
||||
chown -R abc:abc /config/
|
||||
elif [[ -d /metadata ]] && [[ "$(stat -c '%U' /metadata)" != "abc" ]]; then
|
||||
chown -R abc:abc /metadata/
|
||||
fi
|
||||
47
root/etc/services.d/audiobookshelf/run
Normal file
47
root/etc/services.d/audiobookshelf/run
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
|
||||
## Changing ownership recursively on /config still threw ownership errors for some reason
|
||||
files=(
|
||||
"/config/"
|
||||
"/audiobooks/"
|
||||
"/podcasts/"
|
||||
"/metadata/"
|
||||
"/config/users/njodb.properties"
|
||||
"/config/libraryItems/njodb.properties"
|
||||
"/config/sessions/njodb.properties"
|
||||
"/config/libraries/njodb.properties"
|
||||
"/config/settings/njodb.properties"
|
||||
"/config/collections/njodb.properties"
|
||||
"/config/playlists/njodb.properties"
|
||||
"/config/authors/njodb.properties"
|
||||
"/config/series/njodb.properties"
|
||||
"/config/feeds/njodb.properties"
|
||||
"/config/libraryItems"
|
||||
"/config/settings/data"
|
||||
"/config/users/data"
|
||||
"/config/authors/data"
|
||||
"/config/libraries/data"
|
||||
"/config/settings/tmp"
|
||||
"/config/users/tmp"
|
||||
"/config/authors/tmp"
|
||||
"/config/libraries/tmp"
|
||||
"/config/settings/cache"
|
||||
"/config/users/cache"
|
||||
"/config/authors/cache"
|
||||
"/config/libraries/cache"
|
||||
)
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ -f "$file" ]] && [[ "$(stat -c '%U' "$file")" != "abc" ]]; then
|
||||
chown abc:abc "$file"
|
||||
elif [[ -d "$file" ]] && [[ "$(stat -c '%U' "$file")" != "abc" ]]; then
|
||||
chown -R abc:abc "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
PORT=${PORT:-80}
|
||||
|
||||
exec \
|
||||
s6-setuidgid abc npm --prefix /app/audiobookshelf/ --cache /app/audiobookshelf/ run start --port "${PORT}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue