Skip to content

Commit 49591fc

Browse files
committed
move plex chown operation, and change test for it
1 parent e92f5b1 commit 49591fc

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
# check for preferences file, make lock file if not found and exit out
4+
if [ ! -e "/config/Library/Application Support/Plex Media Server/Preferences.xml" ]; then
5+
mkdir -p /config/Library
6+
touch /config/Library/linuxserver-chown.lock
7+
chown abc:abc \
8+
/config/Library
9+
chown abc:abc \
10+
/config/Library/linuxserver-chown.lock
11+
exit 0
12+
fi
13+
14+
if [ ! -f "/config/Library/linuxserver-chown.lock" ]; then
15+
echo "Possible migration from existing version detected, please be patient while we chown existing files"
16+
echo "This could take some time"
17+
chown abc:abc -R \
18+
/config/Library
19+
touch /config/Library/linuxserver-chown.lock
20+
chown abc:abc \
21+
/config/Library/linuxserver-chown.lock
22+
echo "chown operation completed"
23+
fi

root/etc/cont-init.d/50-chown-files

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#######################################################
1010

1111
# test for no version set or opt out for autoupdates
12-
[[ "$ADVANCED_DISABLEUPDATES" ]] || && \
12+
[[ "$ADVANCED_DISABLEUPDATES" ]] && \
1313
exit 0
1414

1515
# set header for no preferences/token message

0 commit comments

Comments
 (0)