[英]Debian 8 openvpn init script ignoring config file
when I run openvpn with 'openvpn server.conf' from '/etc/openvpn' everything works fine. 当我从'/ etc / openvpn'中使用'openvpn server.conf'运行openvpn时,一切正常。 But when i run '/etc/init.d/openvpn start' or '/etc/init.d/openvpn start server' or '/etc/init.d/openvpn start server.conf' the server.conf configfile is ignored. 但是当我运行'/etc/init.d/openvpn start'或'/etc/init.d/openvpn start server'或'/etc/init.d/openvpn start server.conf'时,server.conf配置文件将被忽略。 Why? 为什么?
Hope someone can help me. 希望可以有人帮帮我。
Regards. 问候。
First thing to check is systemd status (Debian 8 is running with systemd if I'm correct). 首先要检查的是systemd状态(如果我正确的话,Debian 8正在使用systemd运行)。
So you can do: systemctl status openvpn and check the output. 因此,您可以执行以下操作: systemctl status openvpn并检查输出。
Let us know the result of this. 让我们知道结果。
Finally I found a solution. 终于我找到了解决方案。 Instead of using /etc/init.d/openvpn restart
you can use 您可以使用/etc/init.d/openvpn restart
来代替
service openvpn restart
or service openvpn restart
或
systemctl restart openvpn.service
to start/stop/restart/reload services. 启动/停止/重新启动/重新加载服务。 https://stackoverflow.com/a/28930361/6217547 led me to this solution. https://stackoverflow.com/a/28930361/6217547使我想到了这个解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.