From 8215a43605b35cc69773014f0350197fbd61d33a Mon Sep 17 00:00:00 2001 From: Youe Graillot Date: Sun, 17 Jul 2022 00:40:04 +0200 Subject: [PATCH] fix scripts permissions --- root/etc/services.d/setup/run | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/root/etc/services.d/setup/run b/root/etc/services.d/setup/run index 00cbefd..f237f98 100644 --- a/root/etc/services.d/setup/run +++ b/root/etc/services.d/setup/run @@ -21,6 +21,16 @@ apiCall() { return 0 } +if [ "$(stat -c '%g' /usr/local/bin/clean-downloads.sh)" != "$PGUID" ]; then + echo "Changing ownership on scripts." + chown "$PUID:$PGID" /usr/local/bin/*.sh +fi + +if [ ! -x /usr/local/bin/clean-downloads.sh ]; then + echo "Making scripts executable." + chmod +x /usr/local/bin/*.sh +fi + echo " ---------------------------------------------------------------------- LIDARR SETUP @@ -83,16 +93,6 @@ FLAC2CUSTOM_ARGS=$FLAC2CUSTOM_ARGS ---------------------------------------------------------------------- " -if [ "$(stat -c '%g' /usr/local/bin/flac2mp3.sh)" != "$PGUID" ]; then - echo "Changing ownership on scripts." - chown "$PUID:$PGID" /usr/local/bin/flac2*.sh -fi - -if [ ! -x /usr/local/bin/flac2mp3.sh ]; then - echo "Making scripts executable." - chmod +x /usr/local/bin/flac2*.sh -fi - if [ "$AUTOCONFIG" = "true" ]; then if [ -n "$FLAC2CUSTOM_ARGS" ]; then echo "[autoconfig] FLAC2CUSTOM_ARGS is set" @@ -110,6 +110,7 @@ Utilities SETUP AUTOCONFIG=$AUTOCONFIG ---------------------------------------------------------------------- " + if [ "$AUTOCONFIG" = "true" ]; then if ! isPresent "Clean Downloads" "notification"; then echo "[autoconfig] Configuring flac2custom.sh custom script"