tee /lib/systemd/system-sleep/rfkill-bluetooth-workaround <<EOF
#!/bin/sh
set -e
if [ "${1}" = "pre" ]; then
rfkill block bluetooth
elif [ "${1}" = "post" ]; then
rfkill unblock bluetooth
fi
EOF
chmod 755 /lib/systemd/system-sleep/rfkill-bluetooth-workaround
Yes, you're correct. Updated snippet:
tee /lib/systemd/ system- sleep/rfkill- bluetooth- workaround <<EOF
#!/bin/sh
set -e
if [ "${1}" = "pre" ]; then system- sleep/rfkill- bluetooth- workaround
rfkill block bluetooth
elif [ "${1}" = "post" ]; then
rfkill unblock bluetooth
fi
EOF
chmod 755 /lib/systemd/