Skip to content

Commit

Permalink
Add timeout for hook/service
Browse files Browse the repository at this point in the history
The script might get stuck or have issues.
This should never get the pacman update stuck.
To avoid the issue this adds timeout to the pacman hook.
A tiemout is also added to the service to avoid taking system resouces when there is an issue.

Fixes #11
  • Loading branch information
jNullj committed Jul 8, 2023
1 parent 81da75d commit 34fb9f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fox-neat-wallpaper.hook
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Target = *
Description = Updating fox-neat-wallpaper for relevant users
Depends = imagemagick
When = PostTransaction
Exec = /bin/bash /opt/fox-neat-wallpaper/hook-script.sh
Exec = /bin/timeout 2m /bin/bash /opt/fox-neat-wallpaper/hook-script.sh
1 change: 1 addition & 0 deletions fox-neat-wallpaper.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Description=Update fox-neat-wallpaper for running user
[Service]
Type=simple
ExecStart=/bin/bash /opt/fox-neat-wallpaper/fox-neat-wallpaper.sh update
TimeoutSec=2min

[Install]
WantedBy=default.target

0 comments on commit 34fb9f4

Please sign in to comment.