Fixed nginx-nonPHP CMS
This commit is contained in:
@@ -3,11 +3,13 @@
|
|||||||
##-----------------##
|
##-----------------##
|
||||||
|
|
||||||
if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
||||||
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then echo 'Php var list missing,Please run /Scipts/GeneratePhplist from the repo ' && exit ; fi
|
|
||||||
|
|
||||||
source /etc/ICTM/selopts.list
|
source /etc/ICTM/selopts.list
|
||||||
source /etc/ICTM/mainvar.list
|
source /etc/ICTM/mainvar.list
|
||||||
source /etc/ICTM/phpvar.list
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
|
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then echo 'Php var list missing,Please run /Scipts/GeneratePhplist from the repo ' && exit ; fi
|
||||||
|
source /etc/ICTM/phpvar.list
|
||||||
|
fi
|
||||||
if [ -f "/etc/ICTM/apachevar.list" ] ; then source /etc/ICTM/apachevar.list; fi
|
if [ -f "/etc/ICTM/apachevar.list" ] ; then source /etc/ICTM/apachevar.list; fi
|
||||||
rm /tmp/pkg.list > $OUTPUT 2>&1
|
rm /tmp/pkg.list > $OUTPUT 2>&1
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
##-----------------##
|
##-----------------##
|
||||||
|
|
||||||
if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
|
||||||
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then echo 'Php var list missing,Please run /Scipts/GeneratePhplist from the repo ' && exit ; fi
|
|
||||||
|
|
||||||
##-----------------##
|
##-----------------##
|
||||||
# Fetching Vars #
|
# Fetching Vars #
|
||||||
@@ -11,7 +10,10 @@ if [ ! -f "/etc/ICTM/phpvar.list" ] ; then echo 'Php var list missing,Please run
|
|||||||
|
|
||||||
source /etc/ICTM/selopts.list
|
source /etc/ICTM/selopts.list
|
||||||
source /etc/ICTM/mainvar.list
|
source /etc/ICTM/mainvar.list
|
||||||
source /etc/ICTM/phpvar.list
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
|
if [ ! -f "/etc/ICTM/phpvar.list" ] ; then echo 'Php var list missing,Please run /Scipts/GeneratePhplist from the repo ' && exit ; fi
|
||||||
|
source /etc/ICTM/phpvar.list
|
||||||
|
fi
|
||||||
if [ -f "/etc/ICTM/apachevar.list" ] ; then source /etc/ICTM/apachevar.list; fi
|
if [ -f "/etc/ICTM/apachevar.list" ] ; then source /etc/ICTM/apachevar.list; fi
|
||||||
rm /tmp/pkg.list
|
rm /tmp/pkg.list
|
||||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list)
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
#Creating webfolder
|
||||||
|
mkdir -p /var/www/"$domain"/html
|
||||||
|
|
||||||
|
#Ceating content
|
||||||
|
echo "<html><head></head><body>$webserv has been succsefully installed by the Wizard</body></html>" > /var/www/$domain/html/index.html
|
||||||
|
|
||||||
#Do not generate php pool when php is not installed
|
#Do not generate php pool when php is not installed
|
||||||
if [ $webserv != nginx_nonphp ]; then
|
if [ $webserv != nginx_nonphp ]; then
|
||||||
|
|
||||||
@@ -9,20 +15,12 @@ useradd -g "$sitename" "$sitename"
|
|||||||
|
|
||||||
systemctl reload $phpFPMService
|
systemctl reload $phpFPMService
|
||||||
|
|
||||||
#Creating webfolder
|
|
||||||
mkdir -p /var/www/"$domain"/html
|
|
||||||
|
|
||||||
#Ceating content
|
|
||||||
echo "<html><head></head><body>$webserv has been succsefully installed by the Wizard</body></html>" > /var/www/$domain/html/index.html
|
|
||||||
|
|
||||||
#Setting Permsissions
|
#Setting Permsissions
|
||||||
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$shortdist" = "el8" ]; then
|
if [ "$shortdist" = "el8" ]; then
|
||||||
#Setting SeLiux perms for centos
|
#Setting SeLiux perms for centos
|
||||||
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/$domain/html(/.*)?" > $OUTPUT 2>&1
|
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/$domain/html(/.*)?" > $OUTPUT 2>&1
|
||||||
restorecon -vr /var/www/ > $OUTPUT 2>&1
|
restorecon -vr /var/www/ > $OUTPUT 2>&1
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user