mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 13:23:21 -07:00
Set user and group when creating directories with installer
This commit is contained in:
parent
56e63e5fa0
commit
7b32e0dcd3
1 changed files with 2 additions and 2 deletions
|
@ -110,12 +110,12 @@ install_plexupdate() {
|
||||||
echo -n "'$FULL_PATH' doesn't exist, attempting to create... "
|
echo -n "'$FULL_PATH' doesn't exist, attempting to create... "
|
||||||
if ! mkdir -p "$FULL_PATH" 2>/dev/null; then
|
if ! mkdir -p "$FULL_PATH" 2>/dev/null; then
|
||||||
sudo mkdir -p "$FULL_PATH" || abort "failed, cannot continue"
|
sudo mkdir -p "$FULL_PATH" || abort "failed, cannot continue"
|
||||||
sudo chown $(whoami) "$FULL_PATH" || abort "failed, cannot continue"
|
sudo chown $(id -un):$(id -gn) "$FULL_PATH" || abort "failed, cannot continue"
|
||||||
fi
|
fi
|
||||||
echo "done"
|
echo "done"
|
||||||
elif [ ! -w "$FULL_PATH" ]; then
|
elif [ ! -w "$FULL_PATH" ]; then
|
||||||
echo -n "'$FULL_PATH' exists, but you don't have permission to write to it. Changing owner... "
|
echo -n "'$FULL_PATH' exists, but you don't have permission to write to it. Changing owner... "
|
||||||
sudo chown $(whoami) "$FULL_PATH" || abort "failed, cannot continue"
|
sudo chown $(id -un):$(id -gn) "$FULL_PATH" || abort "failed, cannot continue"
|
||||||
echo "done"
|
echo "done"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue