projects
/
matthijs
/
servers
/
drsnuggles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
addsite: Check we're not running as root.
[matthijs/servers/drsnuggles.git]
/
usr
/
local
/
bin
/
addsite
diff --git
a/usr/local/bin/addsite
b/usr/local/bin/addsite
index dcae1079667bd8661963d0aa051fcba71d47b091..9ef8ae46876253e7881b007541091e35d4df3897 100755
(executable)
--- a/
usr/local/bin/addsite
+++ b/
usr/local/bin/addsite
@@
-1,5
+1,10
@@
#!/bin/sh
+if [ "$UID" -eq 0 ]; then
+ echo "No need to run as root."
+ exit 1
+fi
+
if [ "$1" = "-h" -o "$1" = "--help" -o $# -ne 1 ]; then
echo "Usage $0 <dirname>"
echo "<dirname> is the full path to the site, such as /var/www/example.nl"