hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.4k stars 680 forks source link

[Bug] netplan 60-hestia.yaml not created #2611

Closed jaapmarcus closed 2 years ago

jaapmarcus commented 2 years ago

Describe the bug

When you run v-add-sys-ip 1.2.3.4 255.255.255.0 on a server with Netplan installed:

A new line should be created in /etc/netplan/60-hestia.yaml

https://github.com/hestiacp/hestiacp/blob/d5a33a06dade2afa0cbac55ad0639c28b0f8caf4/bin/v-add-sys-ip#L89-L113

This causes issues if you want to try to reboot the server and have an website active on the new ip.

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: [emerg] bind() to :80 failed (99: Cannot assign requested address) nginx: configuration file /etc/nginx/nginx.conf test failed

Tell us how to replicate the bug

Run the command:

v-add-sys-ip 1.2.3.4 255.255.255.0 on a server with netplan active for example Hetzner

Run: ls /etc/netplan/

And you will see 60-hestia.yaml is not created

Which components are affected by this bug?

Control Panel Command Line Interface

Hestia Control Panel Version

1.5.15 <

Operating system

Ubuntu

Log capture

No response

jaapmarcus commented 2 years ago

http://drone.hestiacp.com/hestiacp/hestiacp/1465/1/4