Proof: fixed a typo, and handled the case when the script is running from rootless docker

Change-Id: I6decbad624dfb2aa1b89e28ca9271d5da442507c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92864
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
distro/collabora/co-4-2-3
Andras Timar 2020-04-24 16:59:00 +02:00
parent 6e7977bbb8
commit ae1bfa1ffe
1 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,14 @@
#!/bin/bash
SUDO=''
if (( $EUID != 0 )); then
if hash sudo 2>/dev/null; then
SUDO='sudo'
else
"Run the script as root."
exit 1
if [ ! -w "/etc/loolwsd" ]; then
if (( $EUID != 0 )); then
if hash sudo 2>/dev/null; then
SUDO='sudo'
else
echo "Run the script as root."
exit 1
fi
fi
fi