projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved where we do sudo now
[feisty_meow.git]
/
scripts
/
system
/
add_domain.sh
diff --git
a/scripts/system/add_domain.sh
b/scripts/system/add_domain.sh
index e0a6fb48613ffdfacd6f3c283657e20aae059ad8..e6b97fb6660fda2371481e1f05742872001f8ee1 100644
(file)
--- a/
scripts/system/add_domain.sh
+++ b/
scripts/system/add_domain.sh
@@
-8,13
+8,19
@@
#
# Author: Chris Koeritz
#
# Author: Chris Koeritz
+export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
+export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
+
+source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
+
# some defaults that are convenient for current purposes.
# some defaults that are convenient for current purposes.
-# hmmm: these would need to be parameterized somehow for this script to become really general.
+
+# hmmm: !!! these would need to be parameterized somehow for this script to become really general.
# in our scheme, the single IP address that all our domains map to.
IP_ADDRESS="10.28.42.20"
# the email address (where first dot is replaced by @) for the administrator of the domain.
# in our scheme, the single IP address that all our domains map to.
IP_ADDRESS="10.28.42.20"
# the email address (where first dot is replaced by @) for the administrator of the domain.
-SERVER_ADMIN="
fred
.cakelampvm.com"
+SERVER_ADMIN="
developer
.cakelampvm.com"
# the name of the name server for the new domains (should already be configured).
MAIN_NAME_SERVER="ns.cakelampvm.com"
# the name of the mail server for a new domain (should already be configured).
# the name of the name server for the new domains (should already be configured).
MAIN_NAME_SERVER="ns.cakelampvm.com"
# the name of the mail server for a new domain (should already be configured).
@@
-132,7
+138,7
@@
function restart_bind()
# main body of script.
# main body of script.
-if
(( $EUID != 0 ))
; then
+if
[[ $EUID != 0 ]]
; then
echo "This script must be run as root or sudo."
exit 1
fi
echo "This script must be run as root or sudo."
exit 1
fi