Skip to content

Instantly share code, notes, and snippets.

@max-mapper
Created March 10, 2017 00:03
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save max-mapper/19d0fa61e36261d61b8776fa36a81f80 to your computer and use it in GitHub Desktop.
Save max-mapper/19d0fa61e36261d61b8776fa36a81f80 to your computer and use it in GitHub Desktop.
DIY DAT DYNDNS

for ubuntu, to set up a dynamic dns service that tells you what the external ip of some machine is

  • npm install dat lil-pids run-every add-to-systemd -g
  • mkdir ipdat; cd ipdat; dat create; cd ..;
  • edit file services with this:
cd ipdat && dat sync
cd ipdat && run-every 3600 curl ipinfo.io/ip > ip.txt
  • run in background using lil-pids:
sudo $(which add-to-systemd) -u $(whoami) -e PATH=$PATH lil-pids $(which lil-pids) ./services ./pids
sudo systemctl start lil-pids
@ralphtheninja
Copy link

ralphtheninja commented Jul 20, 2017

Shouldn't it be

sudo $(which add-to-systemd) -u $(whoami) -e PATH=$PATH $(which lil-pids) ./services ./pids

without the first lil-pids?

@ralphtheninja
Copy link

Nevermind. After checking the documentation for add-to-systemd I realized first lil-pids is the name of the service. Sorry for being trigger happy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment