Syntax error in Suspend/Resume Script

  • I hope this is a simple one. I'm very new to linux so i'm probably doing something stupid, please help :)

    I am currently trying to create a script to refresh my dvbsky drivers on resume, currently on resume I get 'not tuner available' error.

    I have created the following script here /storage/.config/sleep.d. But on resume/sleep I get the following errors Jul 12 11:13:52 media systemd-sleep[1159]: /storage/.config/sleep.d/01-dvb.power: line 3: syntax error: unexpected word (expecting "in")

    This is the script, any help would be greatly appreciated.

  • Can I just churp in on this for some advice?

    I'm wanting to restart LE when the machine resumes from suspend.

    I've created a file named 01-restart.power with:

    Bash
    #!/bin/sh
    case "$1" in
    pre)
    ;;
    post)
    systemctl restart kodi
    ;;
    esac

    Only issue is that I dont have a /storage/.config/sleep.d/ so I created it and placed the file in there but nothing happens. I've done as above and made sure it is a unix script.

    I do see a /storage/.config/sleep.conf.d/ but placing the file in there makes no difference either.

    Any help would be greatly appreciated.

    Thanks