[fix] Avoid to suspend server if we close lidswitch

This commit is contained in:
ljf (zamentur) 2021-07-17 20:13:42 +02:00 committed by GitHub
parent 8cf9257683
commit 40df98e8f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,6 +135,16 @@ Conflicts=yunohost-firewall.service
ConditionFileIsExecutable=!/etc/init.d/yunohost-firewall ConditionFileIsExecutable=!/etc/init.d/yunohost-firewall
ConditionPathExists=!/etc/systemd/system/multi-user.target.wants/yunohost-firewall.service ConditionPathExists=!/etc/systemd/system/multi-user.target.wants/yunohost-firewall.service
EOF 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() { do_post_regen() {