|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /proc/self/root/opt/alt/python37/lib/python3.7/site-packages/clconfigure/ |
Upload File : |
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2018 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# https://cloudlinux.com/docs/LICENCE.TXT
#
from __future__ import absolute_import
from clconfigure import task, run
@task("Changing default limits state to '{desired_state}'")
def set_default_limits_state(desired_state):
"""
Brings default limits to given state (unlimited | default).
May be executed more that once, does't crash on future calls
"""
if desired_state == 'unlimited':
run(['lvectl', 'set', 'default', 'unlimited'])
else:
raise RuntimeError('Another states temporary unavailable')