TVHeadend and OpenMediaVault3
Added by hackbird hackbird about 7 years ago
Hello Forum,
i got one problem.
I made an shell script which is the folder /etc/systemd/system "script called: "dvbc-sleep.sh"
Here is the script:
_____________________________________________________________________________________________
[Unit]
Description=Restart tvheadend and dvbc
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/systemctl stop tvheadend.service ; /sbin/modprobe -r cx23885 si2157 si2168
ExecStop=/sbin/modprobe cx23885 si2157 si2168 ; /bin/systemctl start tvheadend.service
[Install]
WantedBy=sleep.target
________________________________________________________________________________________________
After restart the NAS with OMV3 there is no problem. All working fine.
When the NAS goes in hibernate, suspend or suspend-hybrid the TVH server wont work. He says he found no signal.
Only when i logged in over console and make this #service dvbc-sleep start
TVH stops and start after a few seconds again and all works fine.
Can someone help where is my fault that the script wont work/start after hibernate or suspend??
Thx
hackbird
Replies (3)
RE: TVHeadend and OpenMediaVault3 - Added by Mark Clarkstone about 7 years ago
I guess you're restarting the tvh service too fast after reloading the modules, you need to wait for the tuners to be ready/initialised. add a sleep before the start.
RE: TVHeadend and OpenMediaVault3 - Added by hackbird hackbird about 7 years ago
Can u say me where in the script?
Dont know where i can set this, THX....
RE: TVHeadend and OpenMediaVault3 - Added by hackbird hackbird about 7 years ago
Hello,
i set the sleep command here "fatblack word":
[Unit]
Description=Restart tvheadend and dvbc
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
sleep 5
ExecStart=/bin/systemctl stop tvheadend.service ; /sbin/modprobe -r cx23885 si2157 si2168
ExecStop=/sbin/modprobe cx23885 si2157 si2168 ; /bin/systemctl start tvheadend.service
[Install]
WantedBy=sleep.target
But it wont work