Skip to content

Commit

Permalink
Check that deployment script is run as root
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Teinum committed Feb 15, 2013
1 parent 57ac657 commit b4e6dbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deploy.sh
@@ -1,4 +1,9 @@
#!/bin/sh
if [ `id -u` -ne 0 ]; then
echo "error: $0 must be run with root privileges."
exit 1
fi

if [ -z $2 ]; then
echo "usage: $0 host port"
echo
Expand All @@ -8,7 +13,6 @@ if [ -z $2 ]; then
echo "should be set to any port that is available."
echo
echo "Example: $0 http://utt.tingtun.no 8000"

exit 1
fi

Expand Down

0 comments on commit b4e6dbe

Please sign in to comment.