| Server IP : 172.67.216.113 / Your IP : 104.23.243.33 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/2388322/root/scripts/ |
Upload File : |
#!/opt/alt/python27/bin/python
# -*- coding: utf-8 -*-
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT
import simplejson as json
import sys
from clselect.node_selector_json import get_user_config_data, set_user_config_data
from secureio import set_user_perm, clpwd
def main():
lines = sys.stdin.read()
json_decode = json.loads(lines)
hook_data = json_decode['data']
user = hook_data['user']
unparked_domain = hook_data['domain']
parent_domain = hook_data['parent_domain']
pw = clpwd.get_pw_by_name(user)
set_user_perm(pw.pw_uid, pw.pw_gid)
user_config = get_user_config_data(user)
for app in user_config:
if user_config[app]['domain'] == unparked_domain:
user_config[app]['domain'] = parent_domain
set_user_config_data(user, user_config)
print 1, 'Ok'
if "__main__" == __name__:
main()