31.12.2019 08:34, Kamal Rathi пишет: > Hi Git-Hub Mailing List, > > I am designing a stop service which has to be run before the kill of user's > scope / session . > As the reboot or shutdown are being initiated the systemd kill all the > users which are in user's.slice > before the script ran so the script is of no use if the user session are > killed first then the stop.service > stop.service > > [Unit] > Description=Service to auto stop the EBS application > DefaultDependencies=no > Before=shutdown.target > RefuseManualStart=true > > [Service] > Type=oneshot > ExecStart=/startdb/stop/stop.sh > > [Install] > WantedBy=shutdown.target reboot.target > This cannot work. systemd first stops everything then starts shutdown target. Your unit is only pulled in at the moment shutdown target is started. > > https://github.com/systemd/systemd/issues/14318 > You have been told there how it should be done properly. What is the point to start your question here with the same non-working variant? _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel