From ed42f8828f92eddd58e25d0ab4cd3cbe7ee42b2f Mon Sep 17 00:00:00 2001 From: Mustafa Arici Date: Sun, 9 Aug 2020 22:39:28 +0300 Subject: [PATCH 1/3] fix(CI): split unit files according to the OS Since ovpmd executable path differs on Ubuntu from RHEL we splitted the unit files in two. Closes #99 --- CHANGELOG.md | 4 ++++ .../{ovpmd.service => ovpmd.service.rhel} | 0 contrib/systemd/ovpmd.service.ubuntu | 18 ++++++++++++++++++ nfpm.yaml | 4 ++-- 4 files changed, 24 insertions(+), 2 deletions(-) rename contrib/systemd/{ovpmd.service => ovpmd.service.rhel} (100%) create mode 100644 contrib/systemd/ovpmd.service.ubuntu diff --git a/CHANGELOG.md b/CHANGELOG.md index 897b7f0..eb49e3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## Unreleased + +- Fix ovpmd not starting error on Ubuntu. [#99](https://github.com/cad/ovpm/issues/99) + ## [v0.2.9](https://github.com/cad/ovpm/tree/v0.2.9) - CLI options to enable comp-lzo back. diff --git a/contrib/systemd/ovpmd.service b/contrib/systemd/ovpmd.service.rhel similarity index 100% rename from contrib/systemd/ovpmd.service rename to contrib/systemd/ovpmd.service.rhel diff --git a/contrib/systemd/ovpmd.service.ubuntu b/contrib/systemd/ovpmd.service.ubuntu new file mode 100644 index 0000000..ce73647 --- /dev/null +++ b/contrib/systemd/ovpmd.service.ubuntu @@ -0,0 +1,18 @@ +[Unit] +Description=OpenVPn Manager +Before=multi-user.target +Before=shutdown.target +After=local-fs.target +After=remote-fs.target +After=network-online.target +After=systemd-journald-dev-log.socket +Wants=network-online.target +Conflicts=shutdown.target + +[Service] +TimeoutSec=5min +PIDFile=/var/run/ovpmd.pid +ExecStart=/sbin/ovpmd + +[Install] +WantedBy=multi-user.target diff --git a/nfpm.yaml b/nfpm.yaml index e584088..6378457 100644 --- a/nfpm.yaml +++ b/nfpm.yaml @@ -17,12 +17,12 @@ overrides: files: ./bin/ovpm: "/bin/ovpm" ./bin/ovpmd: "/sbin/ovpmd" - ./contrib/systemd/ovpmd.service: "/usr/lib/systemd/system/ovpmd.service" + ./contrib/systemd/ovpmd.service.rhel: "/usr/lib/systemd/system/ovpmd.service" deb: files: ./bin/ovpm: "/bin/ovpm" ./bin/ovpmd: "/sbin/ovpmd" - ./contrib/systemd/ovpmd.service: "/lib/systemd/system/ovpmd.service" + ./contrib/systemd/ovpmd.service.ubuntu: "/lib/systemd/system/ovpmd.service" scripts: preinstall: ./scripts/preinstall.sh postinstall: ./scripts/postinstall.sh From 6b718c3f8cd385527b840b7904d61c8ecd372f19 Mon Sep 17 00:00:00 2001 From: Mustafa Arici Date: Sun, 9 Aug 2020 22:43:23 +0300 Subject: [PATCH 2/3] chore(cmd): remove redundant default value for --net flag for vpn init cmd --- cmd/ovpm/cmd_vpn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ovpm/cmd_vpn.go b/cmd/ovpm/cmd_vpn.go index 338b76c..5dbc77e 100644 --- a/cmd/ovpm/cmd_vpn.go +++ b/cmd/ovpm/cmd_vpn.go @@ -51,7 +51,7 @@ var vpnInitCommand = cli.Command{ }, cli.StringFlag{ Name: "net, n", - Usage: fmt.Sprintf("VPN network to give clients IP addresses from, in the CIDR form (default: %s)", ovpm.DefaultVPNNetwork), + Usage: "VPN network to give clients IP addresses from, in the CIDR form", Value: ovpm.DefaultVPNNetwork, }, cli.StringFlag{ From a2ba3799c80c715c9a45f9e85460c9b4d797ecd2 Mon Sep 17 00:00:00 2001 From: Mustafa Arici Date: Sun, 9 Aug 2020 23:10:56 +0300 Subject: [PATCH 3/3] release:v0.2.10 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb49e3d..26a8801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## Unreleased +## [v0.2.10](https://github.com/cad/ovpm/tree/v0.2.10) - Fix ovpmd not starting error on Ubuntu. [#99](https://github.com/cad/ovpm/issues/99)