On Monday 27 June 2016 10:51 AM, Josu Lazkano wrote:
> Thanks for the reply,
>
> I never configure the init script with systemd.
>
> This is what I have in the directory:
>
> # ls -l /etc/systemd/system/
> total 28
> drwxr-xr-x 2 root root 4096 Apr 26 2015 getty.target.wants
> drwxr-xr-x 2 root root 4096 Apr 26 2015 halt.target.wants
> drwxr-xr-x 2 root root 4096 Jun 24 17:33 multi-user.target.wants
> drwxr-xr-x 2 root root 4096 Apr 26 2015 paths.target.wants
> drwxr-xr-x 2 root root 4096 Apr 26 2015 poweroff.target.wants
> drwxr-xr-x 2 root root 4096 Apr 26 2015 reboot.target.wants
> drwxr-xr-x 2 root root 4096 Oct 11 2015 sockets.target.wants
> lrwxrwxrwx 1 root root 31 Apr 26 2015 sshd.service ->
> /lib/systemd/system/ssh.service
> lrwxrwxrwx 1 root root 35 Apr 26 2015 syslog.service ->
> /lib/systemd/system/rsyslog.service
>
> Could you show your openvpn@{name}.service and openvpn@{name}.timer?
I don't use openvpn timers, so can't do that.
my opinion on systemd (FWIW) is that it is not meant for mere mortals
to use. I know that the documentation is excellent, but I find it a bit
obtuse. Though I not in the camp that believes we should abhor it, I
definitely feel the need fro a "systemd for dummies" and how it ties in
with the old ways of working.
Now that the rant is over, well systemd has different places for its
unit files. On my Debian 8.5:
$ cat /etc/debian_version
8.5
$ ls -al /lib/systemd/system/openvpn*
-rw-r--r-- 1 root root 320 Sep 30 2014 /lib/systemd/system/openvpn.service
-rw-r--r-- 1 root root 361 Sep 30 2014 /lib/systemd/system/[email protected]
To start the service on site1:
systemctl start [email protected]
Note: do not use [email protected]; i.e. the name of the file +
extension
To check status:
systemctl status [email protected]
To stop:
systemctl stop [email protected]
To enable on boot time:
systemctl enable [email protected]
To monitor, I use the awesome byobu (a wrapper on top of tmux) and start
the following in one byobu terminal:
$ sudo journalctl -l -u openvpn@site1 -f
That should set you up.
>
> Kind regards.
>
> 2016-06-27 16:23 GMT+02:00 debbie10t <[email protected]>:
>>
>>
>> On 27/06/16 08:34, Josu Lazkano wrote:
>>> Hello,
>>>
>>> I am trying to configure a site to site OpenVPN link between 2 Debian
>>> Jessie servers.
>> <s>
>>> The problem is that I can not start the service with the init script:
>>>
>>> # /etc/init.d/openvpn start
>>> [ ok ] Starting openvpn (via systemctl): openvpn.service.
>> Using systemd, you will need a unit file to start openvpn.
>>
>> I use /etc/systemd/system/openvpn@{name}.service and openvpn@{name}.timer
>>
>> Also note:
>> https://community.openvpn.net/openvpn/ticket/462
>>
>> regards
>>
>>
>> ------------------------------------------------------------------------------
>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
>> present their vision of the future. This family event has something for
>> everyone, including kids. Get more information and register today.
>> http://sdm.link/attshape
>> _______________________________________________
>> Openvpn-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/openvpn-users
>
>
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users