mirror of
https://github.com/h44z/wg-portal.git
synced 2025-08-25 14:31:14 +00:00
fix a few bugs, add instructions for raspberry pi
This commit is contained in:
@@ -73,6 +73,15 @@ func (s *Server) PostAdminEditInterface(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Update WireGuard config file
|
||||
err = s.WriteWireGuardConfigFile()
|
||||
if err != nil {
|
||||
_ = s.updateFormInSession(c, formDevice)
|
||||
s.setFlashMessage(c, "Failed to update wireguard config-file: "+err.Error(), "danger")
|
||||
c.Redirect(http.StatusSeeOther, "/admin/device/edit?formerr=update")
|
||||
return
|
||||
}
|
||||
|
||||
s.setFlashMessage(c, "Changes applied successfully!", "success")
|
||||
s.setFlashMessage(c, "WireGuard must be restarted to apply ip changes.", "warning")
|
||||
c.Redirect(http.StatusSeeOther, "/admin/device/edit")
|
||||
|
Reference in New Issue
Block a user