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:
a87df1f
)
vserver: Make the vserver-create script killall -HUP dnsmasq.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 16 Oct 2008 14:32:32 +0000
(16:32 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 16 Oct 2008 14:32:32 +0000
(16:32 +0200)
usr/local/bin/vserver-create
patch
|
blob
|
history
diff --git
a/usr/local/bin/vserver-create
b/usr/local/bin/vserver-create
index cd621d53fb6c65ce51b6d6946de72d5e8c384043..b3a30e50261c2d2f591508c7d16028e47f208372 100755
(executable)
--- a/
usr/local/bin/vserver-create
+++ b/
usr/local/bin/vserver-create
@@
-18,6
+18,8
@@
HOSTS_VSERVER=dns
# The hosts file to which an entry for the new vserver should be added. Can be
# left empty to not record the new vserver anywhere.
HOSTS_FILE=$VSERVERS_CONF/$HOSTS_VSERVER/vdir/etc/hosts
+# Any extra commands to execute after creating the vserver
+POST_EXEC="sudo vserver $HOSTS_VSERVER exec /usr/bin/killall -HUP dnsmasq"
function usage()
{
@@
-87,3
+89,7
@@
CONF_FOR_GIT=`echo $VSERVERS_CONF/$NAME | sed "s#^/*##"`
if [ -n "$HOSTS_FILE" ]; then
sudo sh -c "echo '$IP $NAME' >> '$HOSTS_FILE'"
fi
+
+if [ -n "$POST_EXEC" ]; then
+ $POST_EXEC
+fi