mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 07:34:27 -04:00
Use modern bash 4.0+ conditional style
This commit is contained in:
parent
6e8e3c69fd
commit
fa771c9505
1 changed files with 4 additions and 5 deletions
|
@ -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
|
|
||||||
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
|
|
||||||
usermod -u $USID $ARCHIVEBOX_USER
|
usermod -u $USID $ARCHIVEBOX_USER
|
||||||
groupmod -g $GRID $ARCHIVEBOX_USER
|
groupmod -g $GRID $ARCHIVEBOX_USER
|
||||||
|
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
|
||||||
fi
|
fi
|
||||||
gosu $ARCHIVEBOX_USER bash -c "$COMMAND"
|
gosu $ARCHIVEBOX_USER bash -c "$COMMAND"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue