Update references to new git location

Changed Web-V2 config location to /etc/WebV2
This commit is contained in:
2023-07-02 20:43:33 +02:00
parent be98df66a9
commit 6922ea61b2
34 changed files with 136 additions and 138 deletions

View File

@@ -1,7 +1,7 @@
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/WebV2/selopts.list" ] || [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
#Getting information and vars
source /etc/ICTM/mainvar.list
source /etc/WebV2/mainvar.list
#CompatUpdater Setup
UpdaterCompatTo=2
@@ -17,7 +17,7 @@ aonoption="/MySQL/"
aonoption="$aonoption /Unattended-Security-Updates/"
aonoption="$aonoption /Backup-Util/"
aonoption="$aonoption /AcmeSH/"
echo 'EnabledAons=('$aonoption')' >> /etc/ICTM/selopts.list
declare -p CompatVer | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
echo 'EnabledAons=('$aonoption')' >> /etc/WebV2/selopts.list
declare -p CompatVer | cut -d ' ' -f 3- >> /etc/WebV2/mainvar.list
printf " [\033[0;32mok\033[0m]\n"

View File

@@ -1,5 +1,5 @@
#loading install vars
source /etc/ICTM/mainvar.list
source /etc/WebV2/mainvar.list
#Setting Vars
sitename=CONFname
domain=DOMAINname
@@ -9,7 +9,7 @@ webservice=WebServer
#Correcting service name for Apache
if [ $webservice = apache ]; then\
source /etc/ICTM/apachevar.list
source /etc/WebV2/apachevar.list
webservice="$apacheService"
ext=.conf
fi
@@ -38,7 +38,7 @@ if test $certsatus -eq 0
then
site_ext="ssl"
mkdir -p /etc/acmesh/inst/$domain
/opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/ICTM/SslServices)'
/opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/WebV2/SslServices)'
else
site_ext="nossl"
rm -rf /etc/acmesh/certs/$domain*

View File

@@ -1,5 +1,5 @@
if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
source /etc/ICTM/mainvar.list
if [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
source /etc/WebV2/mainvar.list
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then
@@ -15,5 +15,5 @@ fi
#Storing vars to config
for storeme in apacheService apacheConfDir; do
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/apachevar.list
declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/apachevar.list
done

View File

@@ -1,5 +1,5 @@
if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
source /etc/ICTM/mainvar.list
if [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
source /etc/WebV2/mainvar.list
if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then
@@ -19,5 +19,5 @@ fi
#Storing vars to config
for storeme in phpPoolDir phpPkgName phpMainConf phpFPMService; do
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list
declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/phpvar.list
done

View File

@@ -9,9 +9,9 @@
#######################################################
#sysCheck
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 bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
source /etc/ICTM/phpvar.list
if [ ! -f "/etc/WebV2/selopts.list" ] || [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi
if [ ! -f "/etc/WebV2/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi
source /etc/WebV2/phpvar.list
#Stop php service
systemctl stop $phpFPMService

View File

@@ -66,8 +66,8 @@ unset dist_ver dist APTMODE
#Repo Vars
repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2
branch=master
repo=https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2
branch=main
branchtype=branch
###Select Module type
@@ -137,7 +137,7 @@ fi
##--------------------##
msg " Preconfiguring"
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash > $OUTPUT 2>&1
curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash > $OUTPUT 2>&1
$PKGUC
$PKGUP

View File

@@ -7,25 +7,25 @@ function usage {
echo
}
if [ -n "$1" ]; then
if [[ ! -f /etc/ICTM/toggle.conf ]]; then
if [[ ! -f /etc/WebV2/toggle.conf ]]; then
echo "Creating File"
touch /etc/ICTM/toggle.conf
touch /etc/WebV2/toggle.conf
fi
source /etc/ICTM/toggle.conf
source /etc/WebV2/toggle.conf
if [ -z "$MonitWeb" ]; then
echo "Creating Var"
echo "MonitWeb=3" >> /etc/ICTM/toggle.conf
echo "MonitWeb=3" >> /etc/WebV2/toggle.conf
MonitWeb=3
fi
if [[ "$1" = "-d" && "$MonitWeb" != 0 ]]; then
echo "Disable MonitWebui"
sed -i '/MonitWeb=/c\MonitWeb=0' /etc/ICTM/toggle.conf
sed -i '/MonitWeb=/c\MonitWeb=0' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/#enables\/disables monit-websocket/!b;n;cdeny from all' /APADIR/sites-enabled/010-Backend.conf
sed -i '/#enables\/disables monit-websocket/ s/^#*/#/' MONITCONF
systemctl reload APASRV monit
elif [[ "$1" = "-e" && "$MonitWeb" != 1 ]]; then
echo "Enable MonitWebui"
sed -i '/MonitWeb=/c\MonitWeb=1' /etc/ICTM/toggle.conf
sed -i '/MonitWeb=/c\MonitWeb=1' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/#enables\/disables monit-websocket/!b;n;c#deny from all' /APADIR/sites-enabled/010-Backend.conf
sed -i '/#enables\/disables monit-websocket/ s/^.//' MONITCONF
systemctl reload APASRV monit

View File

@@ -7,25 +7,25 @@ function usage {
echo
}
if [ -n "$1" ]; then
if [[ ! -f /etc/ICTM/toggle.conf ]]; then
if [[ ! -f /etc/WebV2/toggle.conf ]]; then
echo "Creating File"
touch /etc/ICTM/toggle.conf
touch /etc/WebV2/toggle.conf
fi
source /etc/ICTM/toggle.conf
source /etc/WebV2/toggle.conf
if [ -z "$MonitWeb" ]; then
echo "Creating Var"
echo "MonitWeb=3" >> /etc/ICTM/toggle.conf
echo "MonitWeb=3" >> /etc/WebV2/toggle.conf
MonitWeb=3
fi
if [[ "$1" = "-d" && "$MonitWeb" != 0 ]]; then
echo "Disable MonitWebui"
sed -i '/MonitWeb=/c\MonitWeb=0' /etc/ICTM/toggle.conf
sed -i '/MonitWeb=/c\MonitWeb=0' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/deny all; #enables\/disables monit-websocket/c\ deny all; #enables\/disables monit-websocket' /etc/nginx/sites-enabled/Backend
sed -i '/#enables\/disables monit-websocket/ s/^#*/#/' MONITCONF
systemctl reload nginx monit
elif [[ "$1" = "-e" && "$MonitWeb" != 1 ]]; then
echo "Enable MonitWebui"
sed -i '/MonitWeb=/c\MonitWeb=1' /etc/ICTM/toggle.conf
sed -i '/MonitWeb=/c\MonitWeb=1' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/deny all; #enables\/disables monit-websocket/c\ #deny all; #enables\/disables monit-websocket' /etc/nginx/sites-enabled/Backend
sed -i '/#enables\/disables monit-websocket/ s/^.//' MONITCONF
systemctl reload nginx monit

View File

@@ -7,26 +7,26 @@ function usage {
echo
}
if [ -n "$1" ]; then
if [[ ! -f /etc/ICTM/toggle.conf ]]; then
if [[ ! -f /etc/WebV2/toggle.conf ]]; then
echo "Creating File"
touch /etc/ICTM/toggle.conf
touch /etc/WebV2/toggle.conf
fi
source /etc/ICTM/toggle.conf
source /etc/WebV2/toggle.conf
if [ -z "$NetDa" ]; then
echo "Creating Var"
echo "NetDa=3" >> /etc/ICTM/toggle.conf
echo "NetDa=3" >> /etc/WebV2/toggle.conf
NetDa=3
fi
if [[ "$1" = "-d" && "$NetDa" != 0 ]]; then
echo "Disable Netdata"
sed -i '/NetDa=/c\NetDa=0' /etc/ICTM/toggle.conf
sed -i '/NetDa=/c\NetDa=0' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/deny all; #enables\/disables Netdata/c\ deny all; #enables\/disables Netdata' /etc/nginx/sites-enabled/Backend
systemctl stop netdata
systemctl disable netdata > /dev/null 2>&1
systemctl reload nginx
elif [[ "$1" = "-e" && "$NetDa" != 1 ]]; then
echo "Enable Netdata"
sed -i '/NetDa=/c\NetDa=1' /etc/ICTM/toggle.conf
sed -i '/NetDa=/c\NetDa=1' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/deny all; #enables\/disables Netdata/c\ #deny all; #enables\/disables Netdata' /etc/nginx/sites-enabled/Backend
systemctl start netdata
systemctl enable netdata > /dev/null 2>&1

View File

@@ -7,24 +7,24 @@ function usage {
echo
}
if [ -n "$1" ]; then
if [[ ! -f /etc/ICTM/toggle.conf ]]; then
if [[ ! -f /etc/WebV2/toggle.conf ]]; then
echo "Creating File"
touch /etc/ICTM/toggle.conf
touch /etc/WebV2/toggle.conf
fi
source /etc/ICTM/toggle.conf
source /etc/WebV2/toggle.conf
if [ -z "$PhpMA" ]; then
echo "Creating Var"
echo "PhpMA=3" >> /etc/ICTM/toggle.conf
echo "PhpMA=3" >> /etc/WebV2/toggle.conf
PhpMA=3
fi
if [[ "$1" = "-d" && "$PhpMA" != 0 ]]; then
echo "Disable PhpMyadmin"
sed -i '/PhpMA=/c\PhpMA=0' /etc/ICTM/toggle.conf
sed -i '/PhpMA=/c\PhpMA=0' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;cdeny from all' /APADIR/sites-enabled/010-Backend.conf
systemctl reload APASRV
elif [[ "$1" = "-e" && "$PhpMA" != 1 ]]; then
echo "Enable PhpMyadmin"
sed -i '/PhpMA=/c\PhpMA=1' /etc/ICTM/toggle.conf
sed -i '/PhpMA=/c\PhpMA=1' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;c#deny from all' /APADIR/sites-enabled/010-Backend.conf
systemctl reload APASRV
elif [[ "$1" = "-h" ]]; then

View File

@@ -7,24 +7,24 @@ function usage {
echo
}
if [ -n "$1" ]; then
if [[ ! -f /etc/ICTM/toggle.conf ]]; then
if [[ ! -f /etc/WebV2/toggle.conf ]]; then
echo "Creating File"
touch /etc/ICTM/toggle.conf
touch /etc/WebV2/toggle.conf
fi
source /etc/ICTM/toggle.conf
source /etc/WebV2/toggle.conf
if [ -z "$PhpMA" ]; then
echo "Creating Var"
echo "PhpMA=3" >> /etc/ICTM/toggle.conf
echo "PhpMA=3" >> /etc/WebV2/toggle.conf
PhpMA=3
fi
if [[ "$1" = "-d" && "$PhpMA" != 0 ]]; then
echo "Disable PhpMyadmin"
sed -i '/PhpMA=/c\PhpMA=0' /etc/ICTM/toggle.conf
sed -i '/PhpMA=/c\PhpMA=0' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/deny all; #enables\/disables PHPMyadmin/c\ deny all; #enables\/disables PHPMyadmin' /etc/nginx/sites-enabled/Backend
systemctl reload nginx
elif [[ "$1" = "-e" && "$PhpMA" != 1 ]]; then
echo "Enable PhpMyadmin"
sed -i '/PhpMA=/c\PhpMA=1' /etc/ICTM/toggle.conf
sed -i '/PhpMA=/c\PhpMA=1' /etc/WebV2/toggle.conf
sed -i --follow-symlinks '/deny all; #enables\/disables PHPMyadmin/c\ #deny all; #enables\/disables PHPMyadmin' /etc/nginx/sites-enabled/Backend
systemctl reload nginx
elif [[ "$1" = "-h" ]]; then