diff --git a/CHANGELOG.md b/CHANGELOG.md index 897b7f0..26a8801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [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) + ## [v0.2.9](https://github.com/cad/ovpm/tree/v0.2.9) - CLI options to enable comp-lzo back. 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{ 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