diff --git a/CMS/nextcloud/conf.sh b/CMS/nextcloud/conf.sh index 66e99ba..fd8c8d1 100644 --- a/CMS/nextcloud/conf.sh +++ b/CMS/nextcloud/conf.sh @@ -36,8 +36,16 @@ cat < /var/www/$domain/html/config/autoconfig.php ); EOF +#Setting Permsissions chown "$sitename":"$sitename" -R /var/www/"$domain"/html +if [ "$shortdist" = "cent8" ]; then + #Setting SeLiux perms for centos + semanage fcontext -a -t httpd_sys_rw_content_t /var/www/"$domain"/html > $OUTPUT 2>&1 + restorecon -vr /var/www/ > $OUTPUT 2>&1 +fi + + #Makeing nextcloud Finalize script and setting login Notice curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/nextcloud-init.sh -o ~/NextcloudInit-"$sitename".sh sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/NextcloudInit-"$sitename".sh diff --git a/CMS/none/apache-conf.sh b/CMS/none/apache-conf.sh index 61e695e..989bd96 100644 --- a/CMS/none/apache-conf.sh +++ b/CMS/none/apache-conf.sh @@ -1,9 +1,5 @@ curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Apache-unconfigured -o /tmp/apache-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/g' -e 's/SITEname/'$sitename'/g' /tmp/apache-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf -mkdir -p /var/www/"$domain"/html -echo "$webserv has been succsefully installed by the Wizard" > /var/www/$domain/html/index.html - -chown "$sitename":"$sitename" -R /var/www/"$domain"/html systemctl reload apache2 \ No newline at end of file diff --git a/CMS/none/conf.sh b/CMS/none/conf.sh index 7ab490e..82b124a 100644 --- a/CMS/none/conf.sh +++ b/CMS/none/conf.sh @@ -9,4 +9,20 @@ useradd -g "$sitename" "$sitename" systemctl reload $phpFPMService +#Creating webfolder +mkdir -p /var/www/"$domain"/html + +#Ceating content +echo "$webserv has been succsefully installed by the Wizard" > /var/www/$domain/html/index.html + +#Setting Permsissions +chown "$sitename":"$sitename" -R /var/www/"$domain"/html + +if [ "$shortdist" = "cent8" ]; then + #Setting SeLiux perms for centos + semanage fcontext -a -t httpd_sys_rw_content_t /var/www/"$domain"/html > $OUTPUT 2>&1 + restorecon -vr /var/www/ > $OUTPUT 2>&1 +fi + + fi \ No newline at end of file diff --git a/CMS/none/nginx-conf.sh b/CMS/none/nginx-conf.sh index b842221..9cbedd3 100644 --- a/CMS/none/nginx-conf.sh +++ b/CMS/none/nginx-conf.sh @@ -1,9 +1,5 @@ curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx-unconfigured -o /tmp/nginx-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/g' -e 's/SITEname/'$sitename'/g' /tmp/nginx-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext" -mkdir -p /var/www/"$domain"/html -echo "$webserv has been succsefully installed by the Wizard" > /var/www/$domain/html/index.html - -chown "$sitename":"$sitename" -R /var/www/"$domain"/html systemctl reload nginx \ No newline at end of file diff --git a/CMS/none/nginx_nonphp-conf.sh b/CMS/none/nginx_nonphp-conf.sh index c14ed20..a851b87 100644 --- a/CMS/none/nginx_nonphp-conf.sh +++ b/CMS/none/nginx_nonphp-conf.sh @@ -1,9 +1,5 @@ curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx_nonphp-unconfigured -o /tmp/nginx-siteconf sed -i -e 's/DOMAINname/'$domain'/g' -e 's/SITEname/'$sitename'/g' /tmp/nginx-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext" -mkdir -p /var/www/"$domain"/html -echo "$webserv has been succsefully installed by the Wizard" > /var/www/$domain/html/index.html - -chown www-data:www-data -R /var/www/"$domain"/html systemctl reload nginx \ No newline at end of file diff --git a/CMS/wordpress/conf.sh b/CMS/wordpress/conf.sh index 8a6b844..6d66198 100644 --- a/CMS/wordpress/conf.sh +++ b/CMS/wordpress/conf.sh @@ -48,6 +48,12 @@ fi #Setting Permsissions chown "$sitename":"$sitename" -R /var/www/"$domain"/html +if [ "$shortdist" = "cent8" ]; then + #Setting SeLiux perms for centos + semanage fcontext -a -t httpd_sys_rw_content_t /var/www/"$domain"/html > $OUTPUT 2>&1 + restorecon -vr /var/www/ > $OUTPUT 2>&1 +fi + #Makeing wordpress Finalize script and setting login Notice curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/wordpress-init.sh -o ~/WordpressInit-"$sitename".sh sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/WordpressInit-"$sitename".sh diff --git a/CoreModules/generic/conf.sh b/CoreModules/generic/conf.sh index 8dccf3c..edd1117 100644 --- a/CoreModules/generic/conf.sh +++ b/CoreModules/generic/conf.sh @@ -5,10 +5,6 @@ if [ "$shortdist" = "cent8" ]; then #SeLinux semanage port -a -t ssh_port_t -p tcp 4242 systemctl enable ufw > $OUTPUT 2>&1 - mkdir /var/www > $OUTPUT 2>&1 - semanage fcontext -a -t httpd_sys_rw_content_t /var/www/ > $OUTPUT 2>&1 - restorecon -vr /var/www/ > $OUTPUT 2>&1 - #Motd mkdir /etc/update-motd.d echo 'if stat --printf="" /etc/update-motd.d/51* 2>/dev/null; then for f in /etc/update-motd.d/51*; do bash $f; done; fi' >> /etc/profile