D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
clconfigure
/
Filename :
limits.py
back
Copy
# 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')