adelolmo / hd-idle

Hard Disk Idle Spin-Down Utility
GNU General Public License v3.0
587 stars 32 forks source link

Logfile won't be created #98

Closed opc241 closed 1 year ago

opc241 commented 1 year ago

/etc/default/hd-idle contains the following line (regarding logfile): HD_IDLE_OPTS="-i 0 -a /dev/disk/by-id/usb-TO_Exter_nal_USB_3.0_2015033100081-0:0 -i 1200 -l /home/homecontrol/hd-idle.log"

The problem is, after spindown/spinup no logfile is created. Any idea why? I tried different paths and the actual path configured is not a path on the hdd which i want to spin down.

adelolmo commented 1 year ago

Could you please have a look at the log file documentation? Let me know if the problem persists afterwards.

opc241 commented 1 year ago

Before i posted this, i already had a look on this documentation, but i can't see the reason what i am doing wrong. The disk spins up/down but no logfile is created.

adelolmo commented 1 year ago

You could try creating an empty log file before running hd-idle. e.g. touch /home/homecontrol/hd-idle.log

Also, the daemon is running the service as root. Make sure that the root user has permissions to create/write into the file.

opc241 commented 1 year ago

Make sure that the root user has permissions to create/write into the file.

Thanks, that solved the problem!