Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. [Unit]
  2. Description=My Test
  3. [Service]
  4. Type=notify
  5. User=testuser
  6. ExecStart=/home/iatf/test.sh
  7. [Install]
  8. WantedBy=multi-user.target
  9.  
  10.  
  11. Test.sh (owned by testuser with execute permission)
  12. #!/bin/bash
  13.  
  14. systemd-notify --status="Starting..."
  15. sleep 5
  16. systemd-notify --ready --status="Started"
  17.  
  18. while [ 1 ] ; do
  19. systemd-notify --status="Processing..."
  20. sleep 3
  21. systemd-notify --status="Waiting..."
  22. sleep 3
  23. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement