Fixed oopsie's

This commit is contained in:
2020-07-30 15:22:26 +02:00
parent 8d10e8b853
commit 3b8c214dec
6 changed files with 16 additions and 10 deletions

View File

@@ -81,7 +81,6 @@ if [ $IMODE = n ]; then
[[ -d "/var/www/"$domain"/html" ]] && msg " This domain already exists on this server, Exiting" 8 78 && exit;
if (whiptail --title "Config" --yesno " Does www.${domain} exist in DNS" 8 78); then domainwww=1; else domainwww=0; fi
if (whiptail --title "Set sitename?" --yesno "Set sitename to ${domain//./_} ?" 8 78); then
echo "Yes"
sitename=${domain//./_}
else
while true; do
@@ -117,8 +116,8 @@ if [ $IMODE = l ]; then
done
read -p "Set sitename to ${domain//./_}? (y/n)" choice
case "$choice" in
y|Y ) echo "yes";sitename=${domain//./_};;
n|N ) echo "no";
y|Y ) sitename=${domain//./_};;
n|N ) echo "";
while true; do
echo "Please enter sitename, Must NOT contain special characters, except: _";read sitename
if [[ $sitename == *['!'@#\$%^\&*()+,.]* ]] || [ -z "$sitename" ]
@@ -234,5 +233,5 @@ fi
# Done #
##-------##
msg " Added CMS!"
bash /etc/update-motd.d/51*
msg " Added CMS!"

View File

@@ -258,5 +258,5 @@ done
# Done #
##-------##
msg " Added Module!"
bash /etc/update-motd.d/51*
msg " Added Module!"

View File

@@ -1,5 +1,5 @@
#!/bin/sh
red='\e[1;31m%s\e[0m\n'
printf "\n"
printf $red "Please run nextcloud-init.sh after the first nextcloud login"
printf $red "Please run bash ~/nextcloud-init.sh after the first nextcloud login"
printf "\n"

View File

@@ -4,4 +4,9 @@ sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$
groupadd "$sitename"
useradd -g "$sitename" "$sitename"
#Nextcloud logging location
mkdir /var/log/nextcloud
chmod 774 -R /var/log/nextcloud
ln -s /var/www/"$domain"/html/data/nextcloud.log /var/log/nextcloud/"$sitename"
systemctl reload php"$phpver"-fpm

View File

@@ -7,8 +7,9 @@ sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/ng
if [ $sslenable = 0 ]; then
sed -i -e '/fastcgi_param HTTPS/c\# fastcgi_param HTTPS' /etc/nginx/sites-available/"$sitename"
fi
mkdir -p /var/www/"$domain"/html
systemctl reload nginx
#Getting Nextcloud
wget -t7 http://mirror.nxdi.nl/resources/nextcloud/latest.tar.bz2 -O /tmp/nextcloud.tar.bz2
@@ -47,3 +48,4 @@ wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/nextcloud-init.sh -O ~/ne
sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/nextcloud-init.sh
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/MotdNextCloud -O /etc/update-motd.d/51-nextnotice
chmod +x /etc/update-motd.d/51-nextnotice

View File

@@ -239,8 +239,8 @@ while true; do
done
read -p "Set sitename to ${domain//./_}? (y/n)" choice
case "$choice" in
y|Y ) echo "yes";sitename=${domain//./_};;
n|N ) echo "no";
y|Y ) sitename=${domain//./_};;
n|N ) echo "";
while true; do
echo "Please enter sitename, Must NOT contain special characters, except: _";read sitename
if [[ $sitename == *['!'@#\$%^\&*()+,.]* ]] || [ -z "$sitename" ]
@@ -578,5 +578,5 @@ systemctl reload sshd postfix postfix@-
# Done #
##-------##
msg " Done installing!"
bash /etc/update-motd.d/51*
msg " Done installing!"