I would like to include a file in my /etc/dhcpcd.conf which will include the following, and another application will edit this file and cause the machine to reboot. Note that this is not really a server, but a raspberry pi running a different application which has a small embedded webserver to change configuration settings. I've tried include
"/path/to/my/file.conf"; but upon rebooting, the Pi doesn't have a static IP so uses a dynamic one. But if I include these actual lines in my /etc/dhcpcd.conf file instead of the include statement, it works fine. I suppose I can have my application directly edit /etc/dhcpcd.conf, but thought it would be better with the include file. What should I be doing? Thanks
Code:
interface eth0
static ip_address=10.120.11.30/24
static routers=10.120.11.1
static domain_name_servers=10.120.11.1