Compare commits
No commits in common. "f6513f78e6b99d29c67c49f29037134c66074910" and "3d49f1c7c92cffd145e88da1e418479f80ceb17f" have entirely different histories.
f6513f78e6
...
3d49f1c7c9
|
@ -2,7 +2,7 @@
|
|||
|
||||
#SETTINGS
|
||||
passlen=22
|
||||
emailforle=""
|
||||
emailforle="putyouremailaddresshere@domain.com"
|
||||
|
||||
#FUNCTIONS
|
||||
function errorcheck {
|
||||
|
@ -92,13 +92,6 @@ function gathersettings {
|
|||
echo "IP address is $ipaddress..."
|
||||
echo -n "What is the FQDN for the server? "
|
||||
read fqdn
|
||||
echo -n "Do you want to configure the system hostname the same as the FQDN? (y/n)"
|
||||
read reply
|
||||
if [[ $reply == "y" ]]; then
|
||||
sethost=true
|
||||
else
|
||||
sethost=false
|
||||
fi
|
||||
echo -n "Must an SLL certificate be used? (y/n)"
|
||||
read reply
|
||||
if [[ $reply == "y" ]]; then
|
||||
|
@ -151,9 +144,6 @@ function gathersettings {
|
|||
if [[ $mailfrom == "" ]]; then
|
||||
mailfrom=$mailuser
|
||||
fi
|
||||
if [[ $emailforle == "" ]]; then
|
||||
emailforle=$mailfrom
|
||||
fi
|
||||
echo -n "What is the sender name for the mailserver? "
|
||||
read mailname
|
||||
echo
|
||||
|
@ -228,15 +218,13 @@ function applysettings {
|
|||
|
||||
function sethostname {
|
||||
#SETTING UP HOSTNAME
|
||||
if [[ $sethost == true ]]; then
|
||||
echo "Setting up hostname..."
|
||||
hostnamectl set-hostname ${fqdn%%.*} > /dev/null 2>&1
|
||||
errorcheck $? "define hostname" "EXIT"
|
||||
echo "$ipaddress $fqdn ${fqdn%%.*}" >> /etc/hosts
|
||||
errorcheck $? "define FQDN" "EXIT"
|
||||
echo "1" > "$origpath/setupninja.step"
|
||||
echo
|
||||
fi
|
||||
echo "Setting up hostname..."
|
||||
hostnamectl set-hostname ${fqdn%%.*} > /dev/null 2>&1
|
||||
errorcheck $? "define hostname" "EXIT"
|
||||
echo "$ipaddress $fqdn ${fqdn%%.*}" >> /etc/hosts
|
||||
errorcheck $? "define FQDN" "EXIT"
|
||||
echo "1" > "$origpath/setupninja.step"
|
||||
echo
|
||||
}
|
||||
|
||||
function initsetup {
|
||||
|
@ -291,8 +279,8 @@ function gomariadb {
|
|||
function gophp {
|
||||
#INSTALL PHP
|
||||
echo "Install PHP8.2..."
|
||||
apt -y install php8.2-{fpm,soap,bcmath,common,imagick,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,bz2,fpm} libapache2-mod-php8.2 libapache2-mod-fcgid > /dev/null 2>&1
|
||||
errorcheck $? "apt -y install php8.2-{fpm,soap,bcmath,common,imagick,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,bz2,fpm} libapache2-mod-php8.2 libapache2-mod-fcgid" "EXIT"
|
||||
apt -y install php8.2-{fpm,soap,bcmath,common,imagick,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,bz2,fpm} libapache2-mod-php libapache2-mod-fcgid > /dev/null 2>&1
|
||||
errorcheck $? "apt -y install php8.2-{fpm,soap,bcmath,common,imagick,mysql,gmp,curl,intl,mbstring,xmlrpc,gd,xml,cli,zip,bz2,fpm} libapache2-mod-php libapache2-mod-fcgid" "EXIT"
|
||||
echo "7" > "$origpath/setupninja.step"
|
||||
echo
|
||||
}
|
||||
|
@ -452,10 +440,6 @@ function vhostninja {
|
|||
echo " Require all granted" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo " </Directory>" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo "" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo " <FilesMatch \.php$>" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo " SetHandler \"proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost\"" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo " </FilesMatch>" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo "" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo " ErrorLog ${APACHE_LOG_DIR}/$appdbname_error.log" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo " CustomLog ${APACHE_LOG_DIR}/$appdbname_access.log combined" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
echo "</VirtualHost>" >> /etc/apache2/sites-available/$appdbname.conf
|
||||
|
|
Loading…
Reference in New Issue