diff --git a/data/hooks/conf_regen/01-yunohost b/data/hooks/conf_regen/01-yunohost index 3d65d34cd..29ce5db80 100755 --- a/data/hooks/conf_regen/01-yunohost +++ b/data/hooks/conf_regen/01-yunohost @@ -135,6 +135,16 @@ Conflicts=yunohost-firewall.service ConditionFileIsExecutable=!/etc/init.d/yunohost-firewall ConditionPathExists=!/etc/systemd/system/multi-user.target.wants/yunohost-firewall.service EOF + + # Don't suspend computer on LidSwitch + mkdir -p ${pending_dir}/etc/systemd/logind.conf.d/ + cat > ${pending_dir}/etc/systemd/logind.conf.d/yunohost.conf << EOF +[Login] +HandleLidSwitch=ignore +HandleLidSwitchDocked=ignore +HandleLidSwitchExternalPower=ignore +EOF + } do_post_regen() {