1
0
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:
Nick Sweeting
2020-07-21 16:14:54 -04:00
committed by GitHub
parent 6e8e3c69fd
commit fa771c9505

View File

@@ -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"