Sindbad~EG File Manager

Current Path : /proc/thread-self/root/opt/alt/python37/lib/python3.7/site-packages/clconfigure/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python37/lib/python3.7/site-packages/clconfigure/limits.py

# 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')


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists