Help with a systemd sleep hook

view story

https://bbs.archlinux.org – Because systemd hibernation upon resume for some reason shuts down my laptop screen, I decided to write a post-hibernation script containing a command to reenable it:/usr/lib/systemd/system-sleep/screen-on.sh#!/bin/bash [ "$1" = "post" ] && exec sleep 10 && xrandr --output LVDS-0 --auto && xrandr --output LVDS-0 --primary && xrandr --output LVDS-0 --mode 1680x1050The command itself works, but the script doesn't and I am not sure why. Is there something wrong in it?Also, how can I change it so it only runs on resume from hibernation and n (HowTos)