Mini Shell
#!/usr/bin/bash
# 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
#gpasswd -a "$1" wheel
#sysctl fs.proc_super_gid=`getent group wheel | cut -d: -f3`
#sysctl fs.proc_super_gid=`getent group "$1" | cut -d: -f3`
# skip execution of script on CL OS Solo
if [[ -f "/etc/cloudlinux-edition-solo" ]]; then
exit 0
fi
SYSCTL_CONF='/etc/sysctl.conf'
CL_SYSCTL_BIN='/opt/cloudlinux/venv/bin/cl_sysctl'
FNDGRP=$(id -g "$1")
if [ -n "$FNDGRP" ]; then
FSGID=$(cat ${SYSCTL_CONF} | grep -E "^fs.proc_super_gid\s*=")
if [ -z "$FSGID" ]; then
cp -f ${SYSCTL_CONF} ${SYSCTL_CONF}.bak
${CL_SYSCTL_BIN} remove --parameter fs.proc_super_gid --config ${SYSCTL_CONF}
${CL_SYSCTL_BIN} set --parameter fs.proc_super_gid --value ${FNDGRP}
# CAG-796: use hidepid=2 when mounting /proc
/usr/share/cloudlinux/remount_proc.py
fi
fi
Zerion Mini Shell 1.0