[Unit]
Description=ADSys user logon and logoff scripts execution
Before=shutdown.target
Conflicts=shutdown.target
ConditionPathExists=/run/adsys/users/%U/scripts/.ready

[Service]
Type=notify
# needed for systemd-notify from non root user. Only open it to elements of the cgroup.
NotifyAccess=all
RemainAfterExit=yes
ExecStart=/sbin/adsysd runscripts --allow-order-missing /run/adsys/users/%U/scripts/logon
ExecStop=/sbin/adsysd runscripts --allow-order-missing /run/adsys/users/%U/scripts/logoff

[Install]
WantedBy=default.target
