Navigation Menu

Skip to content

Commit

Permalink
Do not allow running ubuntu script as root
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed May 30, 2017
1 parent b10be4f commit cd9737b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rails-install-ubuntu.sh
@@ -1,5 +1,12 @@
#!/bin/bash

if
[[ "${USER:-}" == "root" ]]
then
echo "This script works only with normal user, it wont work with root, please log in as normal user and try again." >&2
exit 1
fi

set -e

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
Expand Down

0 comments on commit cd9737b

Please sign in to comment.