Need to Create Installation Script

Vs Nu

Well-Known Member
Jul 17, 2015
178
12
68
India
cPanel Access Level
Root Administrator
Hello,
I would like to create an Installation Script so i need to know some commands like i would like to create an file.sh with following commands

Code:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest;
touch /var/cpanel/disable_whm_terminal_ui;
cd /usr/src;
rm -fv csf.tgz;
wget https://download.configserver.com/csf.tgz;
tar -xzf csf.tgz;
cd csf;
sh install.sh;
cd /root/;
I would like to add some additional commands like i had created an Easyapache file Something.json so i can download it over wget from other server and i need to know where that file (which directory) should be uploaded and how i can able to provision that something.json file over command
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Why not use the whmapi1 to make the profile? https://documentation.cpanel.net/display/DD/WHM+API+1+Sections+-+EasyApache

Code:
whmapi1 ea4_save_profile filename=new_profile.json name=New%20Profile pkg=ea-apache24 desc=This%20is%20my%20new%20profile. version=1.3 tag=Apache%202.4 overwrite=1
This eliminates the need to download it, and it automatically configures it in the correct location
 

Vs Nu

Well-Known Member
Jul 17, 2015
178
12
68
India
cPanel Access Level
Root Administrator
Why not use the whmapi1 to make the profile? https://documentation.cpanel.net/display/DD/WHM+API+1+Sections+-+EasyApache

Code:
whmapi1 ea4_save_profile filename=new_profile.json name=New%20Profile pkg=ea-apache24 desc=This%20is%20my%20new%20profile. version=1.3 tag=Apache%202.4 overwrite=1
This eliminates the need to download it, and it automatically configures it in the correct location
I had already downloaded the profile,I just want to download that profile from (wget) and install it