2 # SPDX-License-Identifier: LGPL-2.1-or-later
6 P
=/run
/systemd
/system.conf.d
9 cat >$P/rlimits.conf
<<EOF
11 DefaultLimitNOFILE=10000:16384
14 systemctl daemon-reload
16 [[ "$(systemctl show -P DefaultLimitNOFILESoft)" = "10000" ]]
17 [[ "$(systemctl show -P DefaultLimitNOFILE)" = "16384" ]]
19 [[ "$(systemctl show -P LimitNOFILESoft TEST-05-RLIMITS.service)" = "10000" ]]
20 [[ "$(systemctl show -P LimitNOFILE TEST-05-RLIMITS.service)" = "16384" ]]
22 # shellcheck disable=SC2016
23 systemd-run
--wait -t bash
-c '[[ "$(ulimit -n -S)" = "10000" ]]'
24 # shellcheck disable=SC2016
25 systemd-run
--wait -t bash
-c '[[ "$(ulimit -n -H)" = "16384" ]]'