54 Commits

Author SHA1 Message Date
Daniel Steglich
8608bf6f07
dynamicdns: Fix permissions for all /etc files
The file which contains the credentials should not be readable for
"others".
2016-09-18 16:51:31 +05:30
Daniel Steglich
367b29c50f
dynamicdns: Fix file creation with update URL
The wget command to push the current IP via update URL will download the
update URL document without deleting the HTML document afterwards. This
will cause the script to flood "/root/" folder.
2016-09-07 22:14:57 +05:30
Sunil Mohan Adapa
942b23c3c3
dynamicdns: Change 'lookup' to 'look up'
The original patch Nikhil Rayaprolu had this correct.  I have
incorrectly changed it.  Fixing it.
2016-07-28 22:58:00 +05:30
Nikhil Rayaprolu
777dbbe2a7
dynamicdns: Improve label for IP Check URL 2016-07-28 22:51:29 +05:30
Daniel Steglich
ddc049734d
dynamicdns: Status message improvement
Closes #496.  If no update is done because no update needs to be done,
the success status needs to be written.  Because maybe the DNS record is
up to date when the action script is executed for the first time.  In
this case no success message was written and it looks like DynDNS is not
executed.
2016-06-15 22:47:23 +05:30
Sunil Mohan Adapa
83ec57414c
dynamicdns: Fix starting daemon for no NAT
Incase the machine is not behind NAT, fix the logic that decides to
start the daemon.
2016-02-01 11:03:54 +05:30
Sunil Mohan Adapa
51dd1bb000
dynamicdns: Fix an invalid syntax
'local' keyword can't be used outside a method.
2016-02-01 11:02:43 +05:30
Sunil Mohan Adapa
ea1e9b6e2a
dynamicdns: Fix writing configuration for no NAT
- When writing the configuration file for no NAT case, append then last
  part of the file instead of overwriting.

- Also 'echo' statements are missing leading to attempt to execute the
  config options instead of writing them to a file.
2016-02-01 11:00:46 +05:30
Sunil Mohan Adapa
aa5efd4984
dynamicdns: Fix computing update times
Currenly uptime is being taken as measure to decide whether update must
run.  Uptime is the number of seconds since machine has booted.  If a
machine has run for 30 hours, and rebooted, then update will not be done
until the machine has run for 30 hours + desinated time.  Using seconds
since epoch fixes this.
2016-02-01 10:57:33 +05:30
Sunil Mohan Adapa
2a030f91fe
dynamicdns: Fix reading configuration file
- The current code to parse the configuration file does not work proper
  if there is an '=' in the password.  Fix it.

- Also if predesignated keyword like 'server' occurs in the password,
  configuration can't be read properly.  Fix it.
2016-02-01 10:53:26 +05:30
Daniel Steglich
a90039889d
dynamicdns: Fix passing password via stdin
* Add an option to pass the password via cmdline (optional, not used by
  plinth) if called manually.

* Fix: If -p option was not the last given option, everything after -p
  was lost.  Closes #310.
2016-02-01 10:46:48 +05:30
Daniel Steglich
994e674885 Github issue 320: fixed display error
* switched "ignore SSL cert errors" and "use basic auth"
2015-12-06 22:25:53 +05:30
Sean Alexandre
21b9a5b02a Passwords now sent over stdin instead of command line.
Fixes Issue #166:
Don't pass passwords on command line
https://github.com/freedombox/Plinth/issues/166

This issue was for 4 modules: Transmission, Pagekite, DynamicDNS, and Ikiwiki.
2015-08-23 15:20:08 +05:30
Daniel Steglich
4977258f78 use global wget options in addition to specific wget options 2015-03-26 18:45:17 +01:00
Daniel Steglich
2c36160237 removed debug output 2015-03-26 13:33:50 +01:00
Daniel Steglich
66e9b00567 built in string substitution of bash shell does not work with dash. avoid this incompatibility. 2015-03-25 21:47:50 +01:00
Daniel Steglich
c4fa908dd7 local vars are only possible inside of functions 2015-03-25 21:13:08 +01:00
Daniel Steglich
b4b3bb83f4 updated help message 2015-03-25 21:11:03 +01:00
Daniel Steglich
b4eba95759 fixed missing bracket in awk command 2015-03-25 21:04:01 +01:00
Daniel Steglich
22033aaea5 fixed some syntax errors after last changes 2015-03-25 19:43:22 +01:00
Daniel Steglich
3d8228ce38 made the bash script code shellcheck compatible, replaced obsolete statements 2015-03-25 19:28:43 +01:00
Daniel Steglich
09c541ea5c fixed missing whitespace 2015-03-25 17:30:05 +01:00
Daniel Steglich
c59fcf0d29 fixed status return string of updateurl 2015-03-09 23:30:45 +01:00
Daniel Steglich
41352912a3 copyright notice added 2015-03-09 22:58:51 +01:00
Daniel Steglich
98506f0fdd improved check of current IP, registered at DNS server 2015-03-06 21:46:57 +01:00
Daniel Steglich
7d30480117 improved ipurl check 2015-03-06 21:41:57 +01:00
Daniel Steglich
6acc4cc44f only do a update if DNS entry is outdated 2015-03-06 21:34:57 +01:00
Daniel Steglich
e42b8e5015 covered empty server arguments and made parameter comparsion more easy 2015-03-05 14:03:11 +01:00
Daniel Steglich
eab3ac2cfc added comments 2015-03-04 22:22:30 +01:00
Daniel Steglich
1075665a90 fixed indention 2015-03-04 10:28:28 +00:00
Daniel Steglich
ad1d94f6a6 changed success/failure storage after update is done via update URL 2015-03-04 10:17:48 +00:00
Daniel Steglich
68bd749164 sorround update URL with double qoutes 2015-03-04 10:01:48 +00:00
Daniel Steglich
5c5134f233 store successful update events to be displayed on status page 2015-03-04 09:18:53 +00:00
Daniel Steglich
8bcea1fdae do not show single quotes arround the update URL 2015-03-03 22:46:32 +01:00
Daniel Steglich
145028d518 added function to replace vars from update URL 2015-03-03 22:35:28 +01:00
Daniel Steglich
81ad2019b1 use global defined string variables 2015-03-03 21:18:31 +01:00
Daniel Steglich
875c24e213 added comment lines 2015-03-03 21:14:55 +01:00
Daniel Steglich
b782f36b28 consistent use of dollar bracket to assign variables from system call 2015-03-03 21:10:04 +01:00
Daniel Steglich
f611614c14 consistent use of curly brackets 2015-03-03 21:07:07 +01:00
Daniel Steglich
a2e8a0ec8a prepared update URL functionality (implemented new parameters) 2015-03-02 23:39:28 +01:00
Daniel Steglich
ffcfccb20f beautyfied and refactored code 2015-03-02 20:56:46 +01:00
Daniel Steglich
5b71ce815c cat on a empty string will block the script 2015-02-24 08:05:54 +00:00
Daniel Steglich
fa3b5ae9e6 create config dir if not exist 2015-02-23 20:03:36 +00:00
Daniel Steglich
c0587fd9df reduce retry conuter to avoid UI blocking time 2015-02-23 12:41:28 +00:00
Daniel Steglich
411abfe954 use start-stop-daemon to avoid hanging web page if ez-ipupdate tool is blocking 2015-01-15 21:30:25 +00:00
Daniel Steglich
d2fdf1d403 fixed an issue where first update after initial configuration will not work because the cronjob does not recognize the ip change 2015-01-05 21:14:07 +00:00
Daniel Steglich
91cc161f96 fixed indention 2015-01-05 20:48:45 +00:00
Daniel Steglich
6b6e7f695f improved robustness of update script in case of connection trouble (wget may hang a long time if DNS fails or route is unavailable) 2015-01-05 17:08:15 +00:00
Daniel Steglich
cb52d7fcf0 do not report errors on first run 2015-01-05 16:20:28 +00:00
Daniel Steglich
e91aa7fa44 removed obsolete install options because installation process is done by package framework now 2015-01-05 11:33:28 +00:00