0

Many of these problems are because of a wrong path. This could not have been my problem as I put the absoulute path there. When I started the service, it always displayed "inactive (dead)" even though the start was successful

My .service file was the following:

[Unit]
Description=hd-idle - spin down idle hard disks
Documentation=man:hd-idle(1)
After=network.target

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/root
#EnvironmentFile=/etc/default/hd-idle
ExecStart=/usr/sbin/hd-idle -i 10
Restart=always

[Install]
WantedBy=multi-user.target

0

1 Answer 1

1

I found my solution coincidentally in another StackExchange Post.

It was to set the RemainAfterExit tag to yes in the service category:

RemainAfterExit=yes

The reason for this as I understood it is that the command executes, but changes a system flag for another program to change. When I don't set the RemainAfterExit tag, my program only exits without doing anything, which leads it to just don't do anything in my case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .