Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Commit

Permalink
Updated the path for .linoderc
Browse files Browse the repository at this point in the history
- Using /tmp is stupid, it gets wiped on reboot
- Set to /opt instead
  • Loading branch information
aw committed Sep 6, 2011
1 parent 15aa758 commit 97747d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### Crontab entry
*/10 * * * * bash -c 'source $HOME/.bash_profile && /usr/bin/ruby /opt/linode_dynamic_dns.rb'

## Config file (/tmp/.linoderc)
## Config file (/opt/.linoderc)

The config file ensures you're not constantly hitting Linode with DNS updates.

Expand All @@ -18,4 +18,4 @@ The config file ensures you're not constantly hitting Linode with DNS updates.
## Notes:

* If you ever delete/recreate the A record in your DNS, you'll need to change
* or remove 'dynamic_host_resource_id' from your .linoderc config file
* or remove 'dynamic_host_resource_id' from your .linoderc config file
6 changes: 3 additions & 3 deletions linode_dynamic_dns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# */10 * * * * bash -c 'source $HOME/.bash_profile && /usr/bin/ruby /opt/linode_dynamic_dns.rb'
#
# The config file ensures you're not constantly hitting Linode with DNS updates.
# Config file (/tmp/.linoderc):
# Config file (/opt/.linoderc):
# dynamic_host: macbook
# dynamic_domain: yourdomain.com
# api_key: your-linode-api-key
Expand All @@ -20,10 +20,10 @@
require 'linode'
require 'yaml'

LINODE_CONFIG_FILE = "/tmp/.linoderc"
LINODE_CONFIG_FILE = "/opt/.linoderc"

class LinodeDynDNS
@@config = YAML.load_file(LINODE_CONFIG_FILE) # chmod 600 /tmp/.linoderc
@@config = YAML.load_file(LINODE_CONFIG_FILE) # chmod 600 /opt/.linoderc

def initialize
@@linode = Linode.new(:api_key => @@config['api_key'])
Expand Down

0 comments on commit 97747d5

Please sign in to comment.