iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tons of misc updates
[distro-setup]
/
switch-mail-host
diff --git
a/switch-mail-host
b/switch-mail-host
index b3e78325be1ae01d70d25b734cf991d5dbad86d7..b67203aabc475608a4768cbcc2204126979ef48b 100755
(executable)
--- a/
switch-mail-host
+++ b/
switch-mail-host
@@
-133,9
+133,10
@@
if [[ $new_host == $HOSTNAME ]] && ! $at_home; then
echo | $wrt_shell cedit mail_host /etc/hosts || [[ $? == 1 ]] # 1 means file changed.
else
$wrt_shell bash -s <<EOFOUTER
echo | $wrt_shell cedit mail_host /etc/hosts || [[ $? == 1 ]] # 1 means file changed.
else
$wrt_shell bash -s <<EOFOUTER
- cedit mail_host /etc/hosts <<EOF || /etc/init.d/dnsmasq restart
+ if ! cedit mail_host /etc/hosts <<EOF; then
\$(grep "\b$new_host\b" /etc/hosts | awk '{print \$1}') mail.iankelling.org
EOF
\$(grep "\b$new_host\b" /etc/hosts | awk '{print \$1}') mail.iankelling.org
EOF
+/etc/init.d/dnsmasq restart
EOFOUTER
fi
EOFOUTER
fi