mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-26 14:10:20 +00: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"
|
||||
|
||||
if [ $USID -ne 0 ] && [ $GRID -ne 0 ]
|
||||
then
|
||||
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
|
||||
usermod -u $USID $ARCHIVEBOX_USER
|
||||
groupmod -g $GRID $ARCHIVEBOX_USER
|
||||
if [[ "$USID" != 0 && "$GRID" != 0 ]]; then
|
||||
usermod -u $USID $ARCHIVEBOX_USER
|
||||
groupmod -g $GRID $ARCHIVEBOX_USER
|
||||
chown -R "$USID":"$GRID" "/home/$ARCHIVEBOX_USER"
|
||||
fi
|
||||
gosu $ARCHIVEBOX_USER bash -c "$COMMAND"
|
||||
|
|
Loading…
Reference in a new issue