diff --git a/pkg/machine/machine.go b/pkg/machine/machine.go index e6aad1b..d0e9318 100644 --- a/pkg/machine/machine.go +++ b/pkg/machine/machine.go @@ -52,25 +52,6 @@ func BootFrom() string { } } -func EdgeVPN(instance, rootDir string) (Service, error) { - if utils.IsOpenRCBased() { - return openrc.NewService( - openrc.WithName("edgevpn"), - openrc.WithUnitContent(openrc.EdgevpnUnit), - openrc.WithRoot(rootDir), - ) - } - - return systemd.NewService( - systemd.WithName("edgevpn"), - systemd.WithInstance(instance), - systemd.WithUnitContent(systemd.EdgevpnUnit), - systemd.WithRoot(rootDir), - ) -} - -const EdgeVPNDefaultInstance string = "c3os" - type fakegetty struct{} func (fakegetty) Restart() error { return nil } diff --git a/pkg/machine/openrc/edgevpn.go b/pkg/machine/openrc/edgevpn.go deleted file mode 100644 index 246b525..0000000 --- a/pkg/machine/openrc/edgevpn.go +++ /dev/null @@ -1,19 +0,0 @@ -package openrc - -const EdgevpnUnit string = `#!/sbin/openrc-run - -depend() { - after net - provide edgevpn -} - -supervisor=supervise-daemon -name="edgevpn" -command="edgevpn" -supervise_daemon_args="--stdout /var/log/edgevpn.log --stderr /var/log/edgevpn.log" -pidfile="/run/edgevpn.pid" -respawn_delay=5 -set -o allexport -if [ -f /etc/environment ]; then source /etc/environment; fi -if [ -f /etc/systemd/system.conf.d/edgevpn-c3os.env ]; then source /etc/systemd/system.conf.d/edgevpn-c3os.env; fi -set +o allexport` diff --git a/pkg/machine/systemd/edgevpn.go b/pkg/machine/systemd/edgevpn.go deleted file mode 100644 index 068ffdf..0000000 --- a/pkg/machine/systemd/edgevpn.go +++ /dev/null @@ -1,12 +0,0 @@ -package systemd - -const EdgevpnUnit string = `[Unit] -Description=EdgeVPN Daemon -After=network.target -[Service] -EnvironmentFile=/etc/systemd/system.conf.d/edgevpn-%i.env -LimitNOFILE=49152 -ExecStart=edgevpn -Restart=always -[Install] -WantedBy=multi-user.target`