Project

General

Profile

Update redmines hostname automaticaly for Dynamic Domains

Added by Tobias Weber about 11 years ago

Hi,
I'm operating a redmine server at home, which is connect to the Internet through my local ISP using dynamic IPs. A script automatically checks my IP and creates an automatic redirection, which is uploaded to free web-space, also offered by my ISP. Everything works quite well so far, even email delivery through the ISPs mail-servers.

If a user requests a password by email or anything else by mail. The links in the mail must contain a externally resolvable address of the server, which is typically the hostname or the FQDN of the machine. In my case the link contains the current IP address. To do so I have filled in my IP as the hostname in redmines settings tab, this setup works very well.

But it may happen that the Internet connection resets and a new IP address is assigned to it, which happens about 4 to 6 times a year. In that case the hostname should be updated automatically. The redirection link from static web-space to the redmine server is also updated within 1h, automatically.

So how to automatically update redmines hostname by a script to account for changing IP addresses?

p.s.: Yes I know. When the address changes in the time between having sent the link by mail and the user is clicking on it, it will fail. But it is unlikely to happen often.


Replies (4)

RE: Update redmines hostname automaticaly for Dynamic Domains - Added by Tobias Weber about 11 years ago

Thank you for the answer. I have installed phpmyadmin to browse the MySQL DB on that machine, but did not found anything. Does Redmine use another DB backend thy MySQL?
What are the names of the database, table and parameter to modify?

RE: Update redmines hostname automaticaly for Dynamic Domains - Added by Jan Niggemann (redmine.org team member) about 11 years ago

Tobias Weber wrote:

I have installed phpmyadmin to browse the MySQL DB on that machine, but did not found anything.

Sorry, I was too tired yesterday and thought you'd find it alone.

Does Redmine use another DB backend thy MySQL?

Redmine can use MySQL, Microsoft SQL Server, sqlite3 or PostgreSQL...
The one you use depends on what you set up during installation.

What are the names of the database, table and parameter to modify?

You can find the name of the database as well as the other parameters in your database.yml.

The settings you look for are in the table settings, you probably want to take a look at host_name and protocol...

RE: Update redmines hostname automaticaly for Dynamic Domains - Added by Tobias Weber about 11 years ago

Thanks a lot for the hints.
I'm using my ipUpdate-tool (C++/Qt) to update the host_name in the MYSQL database (redmine_default) tabel (settings). Therefore the redmine server no is fully operating with "semi"-dynamic IPs.

    (1-4/4)