Skip to content

Commit

Permalink
Edited the discovery location for disks. Add sample systemd service.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed Osman committed Oct 7, 2019
1 parent 1594d5d commit ad57302
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fancontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const static int pwmmax = 255; // Max PWM value, do not change
const static uint8_t port = 0x2e;
const static uint8_t fanspeed = 200;
static uint16_t ecbar = 0x00;
const static char * synostoragedir = "/run/disks";
const static char * synostoragedir = "/opt/disks";

void iowrite(uint8_t reg, uint8_t val) {
outb(reg, port);
Expand Down
9 changes: 9 additions & 0 deletions fancontrol.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Fancontrol

[Service]
ExecStart=/usr/local/bin/fancontrol 0 43
Restart=on-failure

[Install]
WantedBy=multi-user.target

0 comments on commit ad57302

Please sign in to comment.