mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-25 11:56:24 +02:00
chore(updater): move updater packages to pkg/updaters/<name>
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants"
|
||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||
uconstants "github.com/qdm12/gluetun/pkg/updaters/constants"
|
||||
)
|
||||
|
||||
func newOpenvpnHandler(ctx context.Context, looper VPNLooper, w warner) http.Handler {
|
||||
@@ -60,7 +60,7 @@ func (h *openvpnHandler) getStatus(w http.ResponseWriter) {
|
||||
openVPNStatus := vpnStatus
|
||||
if vpnStatus != constants.Stopped {
|
||||
vpnSettings := h.looper.GetSettings()
|
||||
if vpnSettings.Type != vpn.OpenVPN {
|
||||
if vpnSettings.Type != uconstants.OpenVPN {
|
||||
openVPNStatus = constants.Stopped
|
||||
}
|
||||
}
|
||||
@@ -88,9 +88,9 @@ func (h *openvpnHandler) setStatus(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var outcome string
|
||||
loopSettings := h.looper.GetSettings()
|
||||
if status == constants.Running && loopSettings.Type != vpn.OpenVPN {
|
||||
if status == constants.Running && loopSettings.Type != uconstants.OpenVPN {
|
||||
// Stop Wireguard if it was the selected type and we want to start OpenVPN
|
||||
loopSettings.Type = vpn.OpenVPN
|
||||
loopSettings.Type = uconstants.OpenVPN
|
||||
outcome = h.looper.SetSettings(h.ctx, loopSettings)
|
||||
} else {
|
||||
// Only update status of OpenVPN
|
||||
|
||||
Reference in New Issue
Block a user