diff options
author | Jérôme Deuchnord <jerome@deuchnord.fr> | 2018-10-06 12:23:40 +0200 |
---|---|---|
committer | Jérôme Deuchnord <jerome@deuchnord.fr> | 2018-10-06 12:23:40 +0200 |
commit | 23aa47d8286219f01329fa46359214c8e2fbc4d4 (patch) | |
tree | 39b576451e9a0ffff37ee538bdc7fe71b70460a9 /scripts | |
parent | 0f5c15d5434ab1ce22f250aeb56271162a6deca0 (diff) | |
download | wallabag-23aa47d8286219f01329fa46359214c8e2fbc4d4.tar.gz wallabag-23aa47d8286219f01329fa46359214c8e2fbc4d4.tar.zst wallabag-23aa47d8286219f01329fa46359214c8e2fbc4d4.zip |
Abort running install and update script if root (closes #3590)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/install.sh | 6 | ||||
-rw-r--r-- | scripts/update.sh | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/scripts/install.sh b/scripts/install.sh index 62a46f4f..7d3311b0 100644 --- a/scripts/install.sh +++ b/scripts/install.sh | |||
@@ -2,6 +2,12 @@ | |||
2 | # You can execute this file to install wallabag | 2 | # You can execute this file to install wallabag |
3 | # eg: `sh install.sh prod` | 3 | # eg: `sh install.sh prod` |
4 | 4 | ||
5 | # Abort running this script if root | ||
6 | if [ "$EUID" == "0" ]; then | ||
7 | echo "Do not run this script as root!" >&2 | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
5 | COMPOSER_COMMAND='composer' | 11 | COMPOSER_COMMAND='composer' |
6 | 12 | ||
7 | DIR="${BASH_SOURCE}" | 13 | DIR="${BASH_SOURCE}" |
diff --git a/scripts/update.sh b/scripts/update.sh index d0598135..4911d7c4 100644 --- a/scripts/update.sh +++ b/scripts/update.sh | |||
@@ -2,6 +2,12 @@ | |||
2 | # You can execute this file to update wallabag | 2 | # You can execute this file to update wallabag |
3 | # eg: `sh update.sh prod` | 3 | # eg: `sh update.sh prod` |
4 | 4 | ||
5 | # Abort running this script if root | ||
6 | if [ "$EUID" == "0" ]; then | ||
7 | echo "Do not run this script as root!" >&2 | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
5 | set -e | 11 | set -e |
6 | set -u | 12 | set -u |
7 | 13 | ||