don't let the install script run as root user
This commit is contained in:
parent
5066db9941
commit
9723c4abc9
1 changed files with 8 additions and 0 deletions
|
|
@ -180,6 +180,13 @@ interactive_check() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check if this script is run as root
|
||||||
|
root_check() {
|
||||||
|
if [ `id -u` -eq 0 ] ; then
|
||||||
|
error "don't run this script as root!"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# check if all necessary binaries are available
|
# check if all necessary binaries are available
|
||||||
binaries_check() {
|
binaries_check() {
|
||||||
for exe in "${!BINARIES[@]}"; do
|
for exe in "${!BINARIES[@]}"; do
|
||||||
|
|
@ -447,6 +454,7 @@ prepare_gem_bundle() {
|
||||||
#### ####
|
#### ####
|
||||||
|
|
||||||
#interactive_check
|
#interactive_check
|
||||||
|
root_check
|
||||||
|
|
||||||
|
|
||||||
# display a nice welcome message
|
# display a nice welcome message
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue