HCoop
/
hcoop
/
zz_old
/
misc
/
scripts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73df01d
)
Make sure that listnew is run as root.
author
mwolson_admin
<mwolson_admin@deleuze.hcoop.net>
Tue, 6 May 2008 14:26:58 +0000
(10:26 -0400)
committer
mwolson_admin
<mwolson_admin@deleuze.hcoop.net>
Tue, 6 May 2008 14:26:58 +0000
(10:26 -0400)
listnew
patch
|
blob
|
blame
|
history
diff --git
a/listnew
b/listnew
index
b811ebe
..
dfb6c3c
100755
(executable)
--- a/
listnew
+++ b/
listnew
@@
-18,6
+18,10
@@
elif test -z "$5"; then
echo "Not enough arguments"
usage
exit 1
echo "Not enough arguments"
usage
exit 1
+elif "$UID" != "0"; then
+ echo "This program must be run as root"
+ usage
+ exit 1
else
LIST_NAME=$1
LIST_DOMAIN=$2
else
LIST_NAME=$1
LIST_DOMAIN=$2
@@
-26,8
+30,13
@@
else
LIST_PASS=$5
fi
LIST_PASS=$5
fi
-sudo -u list $BIN/newlist $LIST_NAME@$LIST_DOMAIN $LIST_USER@hcoop.net \
- $LIST_PASS </dev/null
+# If DOMAIN is hcoop.net, force it to be lists.hcoop.net.
+if test "$LIST_DOMAIN" = "hcoop.net"; then
+ LIST_DOMAIN=lists.hcoop.net
+fi
+
+sudo -u list $BIN/newlist \
+ $LIST_NAME@$LIST_DOMAIN $LIST_USER@hcoop.net $LIST_PASS </dev/null
# By default, use our list admin website for the public interface.
# This can be changed after the user has set up their mailMan
# By default, use our list admin website for the public interface.
# This can be changed after the user has set up their mailMan