2

systemctl stop openvpn@server && systemctl disable [email protected]

After running these commands server sould be disabled and prevented from starting in next boot ?

when I reboot status is this :

[email protected] - OpenVPN connection to server
   Loaded: loaded (/lib/systemd/system/[email protected]; disabled;vendor preset: enabled)         
   Active: active (running) since ma 2018-05-21 10:44:57 EEST; 49s ago

So it is running after stopping and disabling after reboot . I just got openvpn 2.4 disable working on virtual machine with its own new innovations with systemd just to find 2.3 does not work as I expected .

Might be that I have misunderstood something , any advice appreciated.

1 Answer 1

1

There are a lot of reasons a systemd service could be triggered, including dependencies that are hard to track down. systemctl disable only stops it from being associated with units that are declared as requires, wants, requiredby etc. It does not disable the unit from starting entirely.

To hard disable the service from starting, create a symbolic link to /dev/null in /etc/systemd/system with the name fo the instance you want to disable.

ln -s /dev/null /etc/systemd/system/[email protected]
1
  • 1
    Thanks for saving me from more wasted time . I'll try to add some solution in a script I'm working with . Disable does not work in 2.3 so redirecting it to /dev/null or moving server.conf to other location instead of trying to "disable" service seems to be only reasonable solution .
    – p.la
    May 22, 2018 at 16:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .