Exemple :
[Service] LogLevelMax=3
[Unit] After=hibernate.target After=hybrid-sleep.target After=suspend.target After=suspend-then-hibernate.target [Service] Type=simple ExecStart=/bin/systemctl --no-block restart your-unit.service [Install] WantedBy=hibernate.target WantedBy=hybrid-sleep.target WantedBy=suspend.target WantedBy=suspend-then-hibernate.target