File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 4141# Default settings
4242# Put this to 0 if you want use bash -x to debug it
4343debug=1
44- # Pacakge to be used by default "default"
45- hestia_package=default
4644
4745if [ -f " $1 " ]; then
4846 cpanel_backup=" $1 "
@@ -106,6 +104,16 @@ if [ -n "$check_sysuser" ] || [ -e "$HESTIA/data/users/$new_user" ]; then
106104 exit 2
107105fi
108106
107+ # Extract cPanel package name
108+ cpanel_package_name=$( cat ./cp/$new_user | grep ' PLAN=' | cut -f2 -d' =' )
109+ if /usr/local/hestia/bin/v-list-user-packages | grep -qw " $cpanel_package_name " ; then
110+ hestia_package=" $cpanel_package_name "
111+ echo " Package $hestia_package will be used for the user."
112+ else
113+ hestia_package=" default" # Replace "default" with your default Hestia package name
114+ echo " Default package $hestia_package will be used for the user."
115+ fi
116+
109117# Create a new user
110118tmp_passwd=$( generate_password)
111119email=$( cat ./cp/$new_user | grep CONTACTEMAIL= | cut -f2 -d' =' )
You can’t perform that action at this time.
0 commit comments