my service needs to delay the stop of ssh during shutdown.
New ssh connections while my service is still runnign must be accpted, too.
The remaining problem is that upon shutdown/restart existing ssh users
still get disconnected.
How can I that postpone, too? or, better: what is the missing depdency?
well, when you say "After=ssh.service" you get started after ssh at boot
and since shutdown is the reverse order ssh is terminated before your
so i would just say "Before=ssh.service" instead "After=ssh.service" ,
in that case ssh connections are only accepted after your service is
started and ssh is not killed as long your service is running
you can have only one of both
it's impossible to decalre a different order at boot and at shutdown
becaus eit makes no sense - you express ordering meaning "x makes only
sense after y is started" and the logical consequence is that the
sutdown acts in reverse order
when you say "After=myqld" you wan't to get started after mysqld because
your service can't live wothout, so it amkes zero sense at shutdown kill
mysqld first and then your service, given it's a webserver depending on
a working database otherwise it would accept new client connections it