Permalink
Browse files

Merge @marshally's /etc/resolver uninstall patch from #129

Conflicts:
	README.md
  • Loading branch information...
2 parents 4f58fa9 + ffe0c1b commit e252047d14c19a262511a57c9f14260fece26f7f @sstephenson sstephenson committed May 4, 2011
Showing with 20 additions and 2 deletions.
  1. +12 −0 MANUAL.md
  2. +1 −0 build.sh
  3. +1 −1 lib/templates/installer/resolver.js
  4. +1 −0 src/templates/installer/resolver.eco
  5. +5 −1 uninstall.sh
View
@@ -216,6 +216,18 @@ full list of settings that you can change.
finding the `pow` process in OS X's Activity Monitor and clicking
"Quit Process".
+**Note**: If you change the value of POW_DOMAINS, you must reinstall
+ Pow using `curl gx.get.pow | sh`. This is because the relevant files
+ in `/etc/resolver/` are created at install time.
+
+**WARNING**: Adding top level domains like ".com" to POW_DOMAINS
+ can be hazardous to your health! In the (likely) event that at some
+ point you lock yourself out of these domains, you will be unable to
+ reach important domains like github.com (where you can find the
+ source code), S3 (where the pow install.sh/uninstall.sh are hosted).
+ Do not panic! Delete the files Pow has created in `/etc/resolver/` and
+ DNS activity will return to normal.
+
## Contributing ##
Pow is written in [Node.js](http://nodejs.org/) with
View
@@ -10,6 +10,7 @@ cake build
mkdir -p "$ROOT/$VERSION/node_modules"
cp -R package.json bin lib "$ROOT/$VERSION"
+cp Cakefile "$ROOT/$VERSION"
cp -R node_modules/ndns "$ROOT/$VERSION/node_modules"
cd "$ROOT/$VERSION"
npm install >/dev/null
@@ -19,7 +19,7 @@ module.exports = function(__obj) {
return _safe(result);
};
(function() {
- _print(_safe('nameserver 127.0.0.1\nport '));
+ _print(_safe('# Lovingly generated by Pow\nnameserver 127.0.0.1\nport '));
_print(this.dnsPort);
_print(_safe('\n'));
}).call(this);
@@ -1,2 +1,3 @@
+# Lovingly generated by Pow
nameserver 127.0.0.1
port <%= @dnsPort %>
View
@@ -43,7 +43,7 @@
POW_VERSIONS_PATH="$POW_ROOT/Versions"
POWD_PLIST_PATH="$HOME/Library/LaunchAgents/cx.pow.powd.plist"
FIREWALL_PLIST_PATH="/Library/LaunchDaemons/cx.pow.firewall.plist"
-
+ POW_CONFIG_PATH="$HOME/.powconfig"
# Fail fast if Pow isn't present.
@@ -104,4 +104,8 @@
sudo launchctl unload "$FIREWALL_PLIST_PATH" 2>/dev/null || true
sudo rm -f "$FIREWALL_PLIST_PATH"
+
+# Remove /etc/resolver files that belong to us
+ grep -Rl 'generated by Pow' /etc/resolver/ | sudo xargs rm
+
echo "*** Uninstalled"

0 comments on commit e252047

Please sign in to comment.