diff --git a/install.sh b/install.sh index ff2cc16..2e75846 100755 --- a/install.sh +++ b/install.sh @@ -146,6 +146,9 @@ install_data misc_systemd_units/user@.service.d/depend-on-remote-homes.conf \ mkdir -p "$DESTDIR$sysconfdir/systemd/logind.conf.d" install_data misc_etc_files/systemd/logind.conf.d/disable_RemoveIPC.conf \ "$DESTDIR$sysconfdir/systemd/logind.conf.d/disable_RemoveIPC.conf" +mkdir -p "$DESTDIR$systemdunitdir/user-.slice.d" +install_data misc_systemd_units/20-resource-limits-geniux.conf \ + "$DESTDIR$systemdunitdir/user-.slice.d/20-resource-limits-geniux.conf" install_data logrotate/logrotate.conf "$DESTDIR$sysconfdir/logrotate.conf" install_data logrotate/logrotate.service "$DESTDIR$systemdunitdir/logrotate.service" install_data logrotate/logrotate.timer "$DESTDIR$systemdunitdir/logrotate.timer" diff --git a/misc_systemd_units/20-resource-limits-geniux.conf b/misc_systemd_units/20-resource-limits-geniux.conf new file mode 100644 index 0000000..408a776 --- /dev/null +++ b/misc_systemd_units/20-resource-limits-geniux.conf @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=User Slice of UID %j +Documentation=man:user@.service(5) +After=systemd-user-sessions.service +StopWhenUnneeded=yes +ConditionHost=geniux.molgen.mpg.de +ConditionUser=!0 + +[Slice] +CPUQuota=100% +MemoryMax=3G