Power Management: Difference between revisions

Clarified that solutions may vary when troubleshooting a blocked pre-sleep.service
Sandro (talk | contribs)
Line 30: Line 30:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  systemd.services.your-service-name = {  
systemd.services.your-service-name = {  
    description = "Service description here";
  description = "Service description here";
    wantedBy = [ "post-resume.target" ];
  wantedBy = [ "post-resume.target" ];
    after = [ "post-resume.target" ];
  after = [ "post-resume.target" ];
    script = ''
  script = ''
     echo "This should show up in the journal after resuming."
     echo "This should show up in the journal after resuming."
    '';
  '';
    serviceConfig.Type = "oneshot";
  serviceConfig.Type = "oneshot";
  };
};
</syntaxhighlight>
</syntaxhighlight>