hdd_menu.cpp: kill hdidle if hddsleep is active

Origin commit data
------------------
Branch: ni/coolstream
Commit: 58d2f99ba8
Author: Frankenstone <dampf_acc@online.de>
Date: 2019-01-20 (Sun, 20 Jan 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Frankenstone
2019-01-20 23:33:59 +01:00
committed by vanhofen
parent 7af966d55a
commit c79975ece3

View File

@@ -1415,7 +1415,7 @@ int CHDDDestExec::exec(CMenuTarget* /*parent*/, const std::string&)
const char hdidle[] = "/sbin/hd-idle";
bool have_hdidle = !access(hdidle, X_OK);
if (have_hdidle) {
if (have_hdidle && g_settings.hdd_sleep > 0) {
system("kill $(pidof hd-idle)");
int sleep_seconds = g_settings.hdd_sleep;
switch (sleep_seconds) {