projects
/
matthijs
/
servers
/
drsnuggles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b60362b
)
addsite: Check we're not running as root.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 29 Jul 2009 08:05:34 +0000
(10:05 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Wed, 29 Jul 2009 08:05:34 +0000
(10:05 +0200)
usr/local/bin/addsite
patch
|
blob
|
history
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"