Skip to content

Commit

Permalink
chown only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhotio committed Feb 12, 2024
1 parent 6de9caf commit 8017b26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions root/etc/s6-overlay/s6-rc.d/init-setup-app/run
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ ENVIRONMENT APP
"

ln -s -f -n "${CONFIG_DIR}/" "${CONFIG_DIR}/.stash"
chown -h hotio:hotio "${CONFIG_DIR}/.stash"
find "${CONFIG_DIR}/.stash" -maxdepth 0 \( ! -user hotio -or ! -group hotio \) -exec chown -h hotio:hotio {} +

if [[ ! -e "${CONFIG_DIR}/.stash/ffmpeg" ]]; then
ln -s "$(command -v ffmpeg)" "${CONFIG_DIR}/.stash/ffmpeg"
chown -h hotio:hotio "${CONFIG_DIR}/.stash/ffmpeg"
find "${CONFIG_DIR}/.stash/ffmpeg" -maxdepth 0 \( ! -user hotio -or ! -group hotio \) -exec chown -h hotio:hotio {} +
fi

if [[ ! -e "${CONFIG_DIR}/.stash/ffprobe" ]]; then
ln -s "$(command -v ffprobe)" "${CONFIG_DIR}/.stash/ffprobe"
chown -h hotio:hotio "${CONFIG_DIR}/.stash/ffprobe"
find "${CONFIG_DIR}/.stash/ffprobe" -maxdepth 0 \( ! -user hotio -or ! -group hotio \) -exec chown -h hotio:hotio {} +
fi

0 comments on commit 8017b26

Please sign in to comment.