Abort running install and update script if root (closes #3590)

This commit is contained in:
Jérôme Deuchnord 2018-10-06 12:23:40 +02:00
parent 0f5c15d543
commit 23aa47d828
2 changed files with 12 additions and 0 deletions

View file

@ -2,6 +2,12 @@
# You can execute this file to install wallabag # You can execute this file to install wallabag
# eg: `sh install.sh prod` # eg: `sh install.sh prod`
# Abort running this script if root
if [ "$EUID" == "0" ]; then
echo "Do not run this script as root!" >&2
exit 1
fi
COMPOSER_COMMAND='composer' COMPOSER_COMMAND='composer'
DIR="${BASH_SOURCE}" DIR="${BASH_SOURCE}"

View file

@ -2,6 +2,12 @@
# You can execute this file to update wallabag # You can execute this file to update wallabag
# eg: `sh update.sh prod` # eg: `sh update.sh prod`
# Abort running this script if root
if [ "$EUID" == "0" ]; then
echo "Do not run this script as root!" >&2
exit 1
fi
set -e set -e
set -u set -u