mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-22 06:03:23 +02:00
Use modern bash 4.0+ conditional style
This commit is contained in:
@@ -14,10 +14,9 @@ COMMAND="$@"
|
|||||||
|
|
||||||
chown "$USID":"$GRID" "$DATA_DIR"
|
chown "$USID":"$GRID" "$DATA_DIR"
|
||||||
|
|
||||||
if [ $USID -ne 0 ] && [ $GRID -ne 0 ]
|
if [[ "$USID" != 0 && "$GRID" != 0 ]]; then
|
||||||
then
|
usermod -u $USID $ARCHIVEBOX_USER
|
||||||
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
|
groupmod -g $GRID $ARCHIVEBOX_USER
|
||||||
usermod -u $USID $ARCHIVEBOX_USER
|
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
|
||||||
groupmod -g $GRID $ARCHIVEBOX_USER
|
|
||||||
fi
|
fi
|
||||||
gosu $ARCHIVEBOX_USER bash -c "$COMMAND"
|
gosu $ARCHIVEBOX_USER bash -c "$COMMAND"
|
||||||
|
Reference in New Issue
Block a user