0

I'm still trying to get familiar with systemd, but I still don't understand basic stuff.

I have snx vpn. I'd like to have it as user systemd service. For simplicity say I'll start it manually. I can do it somehow, but I'm not sure if status will work, since snx starts in background and does not create any pid file, and one cannot customize command to figure out status. But I'm fine with that, lets say no status. But I'd really like to have behavior, that vpn automatically stops upon system sleep. And I'd like not to use script in "/usr/lib/systemd/system-sleep" as that probably contradicts user-level systemd unit and iirc it is considered more like a hack to write scripts in here.

Can anyone advice, how to stop service before system-sleep?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.