openvpn-2.5.6-r1.ebuild pkg_postinst()
dent00x ~ # equery which openvpn
/var/db/repos/gentoo/net-vpn/openvpn/openvpn-2.5.6-r1.ebuild
dent00x ~ # file /var/db/repos/gentoo/net-vpn/openvpn/openvpn-2.5.6-r1.ebuild
/var/db/repos/gentoo/net-vpn/openvpn/openvpn-2.5.6-r1.ebuild: Gentoo ebuild, EAPI 7, ASCII text
pkg_postinst() {
tmpfiles_process openvpn.conf
if use x64-macos ; then
elog "You might want to install tuntaposx for TAP interface support:"
elog "http://tuntaposx.sourceforge.net"
fi
if systemd_is_booted || has_version sys-apps/systemd ; then
elog "In order to use OpenVPN with systemd please use the correct systemd service file."
elog ""
elog "server:"
elog ""
elog "- Place your server configuration file in /etc/openvpn/server"
elog "- Use the openvpn-server@.service like so"
elog "systemctl start openvpn-server@{Server-config}"
elog ""
elog "client:"
elog ""
elog "- Place your client configuration file in /etc/openvpn/client"
elog "- Use the openvpn-client@.service like so:"
elog "systemctl start openvpn-client@{Client-config}"
else
elog "The openvpn init script expects to find the configuration file"
elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
elog ""
elog "To create more VPNs, simply create a new .conf file for it and"
elog "then create a symlink to the openvpn init script from a link called"
elog "openvpn.newconfname - like so"
elog " cd /etc/openvpn"
elog " ${EDITOR##*/} foo.conf"
elog " cd /etc/init.d"
elog " ln -s openvpn openvpn.foo"
elog ""
elog "You can then treat openvpn.foo as any other service, so you can"
elog "stop one vpn and start another if you need to."
fi
if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
ewarn ""
ewarn "WARNING: If you use the remote keyword then you are deemed to be"
ewarn "a client by our init script and as such we force up,down scripts."
ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
ewarn "can move your scripts to."
fi
if use plugins ; then
einfo ""
einfo "plugins have been installed into /usr/$(get_libdir)/${PN}/plugins"
fi
}
/var/db/repos/gentoo/net-vpn/openvpn/openvpn-2.5.6-r1.ebuild lines 87-197/197 (END)
https://community.openvpn.net/openvpn/wiki/OpenVPN-systemd-use
Verify OpenVPN systemd support
$ openvpn --version
Required FLAG enable_systemd=yes - This FLAG must be listed to continue.
DNS with systemd
Free Research Preview. ChatGPT may produce inaccurate information about people, places, or facts. ChatGPT May 24 Version
Comments
Post a Comment