i have a suspend script which doesn't seem to be running. The script is located in
Code:
/lib/systemd/system-sleep
and also
Code:
 /etc/pm/sleep.d
the script is named
Code:
99_htpc.sh
and has executable permissions with the owner as root.


Code:
#!/bin/bash

case "$1" in
suspend|hibernate)
service tvheadend stop
sleep 3
modprobe -v -r smipcie m88ds3103 dvb_core m88rs6000t
;;
resume|thaw)
modprobe smipcie m88ds3103 dvb_core m88rs6000t
sleep 3
service tvheadend start
;;
esac
It's meant to stop TVheadend and restart it along with stopping and reloading my SkyDVB S952 modules because the DVB card doesn't work after suspend, so i'm trying to unload the modules and then reload them.
After waking from suspend, TVheadend can't use the DVB card but if i run
Code:
service tvheadend stop modprobe -v -r smipcie m88ds3103 dvb_core m88rs6000t
then
Code:
 modprobe smipcie m88ds3103 dvb_core m88rs6000t service tvheadend start
TVheadend restarts and so does the DVB card and it works fine.

So i'm trying to work out why it doesn't work when i use it as a script, could anyone help me please?