Skip to content

Commit

Permalink
reload configuraiton with SIGHUP
Browse files Browse the repository at this point in the history
  • Loading branch information
mazunki committed Jun 28, 2024
1 parent c62bbe3 commit 3e81354
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ You can use this to generate your configuration by doing `amdfan print-default -
`frequency` (default `5`): how often (in seconds) we wait between updates
`cards` (required): a list of card names (from `/sys/class/drm`) which we want to control.

Note! You can send a SIGHUP signal to the daemon to request a reload of the config without restarting the whole service.

# Install

Users: Use your package manager to install the package. It's available on Arch Linux and Gentoo. For other distributions, please request a maintainer to bring the package to your system, or read the installation notes at your own warranty.
Expand Down
4 changes: 4 additions & 0 deletions dist/openrc/amdfan.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ command_args="--daemon"
command_background=true
pidfile="/var/run/${RC_SVCNAME}.pid"

reload() {
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
}

1 change: 1 addition & 0 deletions dist/systemd/amdfan.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Requires=multi-user.target

[Service]
ExecStart=@bindir@/amdfan --daemon
ExecReload=kill -HUP $MAINPID
Restart=always

[Install]
Expand Down

0 comments on commit 3e81354

Please sign in to comment.