Compare commits

...

3 Commits

Author SHA1 Message Date
Jay ce500d71bb fix bug 2018-01-08 11:34:54 +08:00
Administrator a174601434 Update ddns.service 2017-03-14 16:23:21 +09:00
Administrator dd1077d376 Update config.sample.json 2017-03-14 11:08:36 +09:00
4 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
config.json
node_modules
package-lock.json

4
app.js
View File

@ -59,7 +59,7 @@ const runUpdateDNS = async() => {
for (let j in config.domain) {
if (config.domain[j].name == tmp.name) {
config.domain[j].id = tmp.id;
console.log(`${Date.now()} - get domain ${config.domain[i].name} id: ${tmp.id}`);
console.log(`${Date.now()} - get domain ${config.domain[j].name} id: ${tmp.id}`);
}
}
}
@ -104,4 +104,4 @@ const runUpdateDNS = async() => {
};
runUpdateDNS();
setInterval(() => runUpdateDNS(), 300000);
setInterval(() => runUpdateDNS(), 300000);

View File

@ -9,7 +9,7 @@
}
},
"domain": [{
"name": "example.com",
"name": "example.com.",
"sub": [
{ "name": "sub1" }
]

View File

@ -3,7 +3,7 @@ Description=NodeJS ConoHa DNS API
After=network.target
[Service]
ExecStart=node /home/ddns/app.js
ExecStart=/usr/local/bin/node /home/ddns/app.js
Restart=always
User=root
Environment="NODE_ENV=production"