Skip to content

Commit

Permalink
Update nextcloud_addon.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzkeil authored Aug 11, 2023
1 parent 8ffae3e commit 91786f4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/nextcloud_addon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ echo "--------------------------------------------------------------------------
read -p "nextcloud admin password : " -e -i $randomkey3 nextpass
echo "--------------------------------------------------------------------------------------------------------"
echo "--------------------------------------------------------------------------------------------------------"

read -p "nextcloud data folder : " -e -i /opt/nextcloud/data ncdatafolder
echo "--------------------------------------------------------------------------------------------------------"
echo "--------------------------------------------------------------------------------------------------------"

cat <<EOF >> /root/nextcloud_mysql_password_list.txt
!! Maybe delete or encrypt this file .... !!
Expand Down Expand Up @@ -233,14 +235,14 @@ cat <<EOF >> /etc/apache2/sites-available/nc.conf
EOF


mkdir -p /opt/nextcloud/data
mkdir -p $ncdatafolder
cd /var/www
curl -o nextcloud.zip https://download.nextcloud.com/server/releases/latest.zip
unzip -qq nextcloud.zip


chown -R www-data:www-data /var/www/nextcloud
chown -R www-data:www-data /opt/nextcloud/data
chown -R www-data:www-data $ncdatafolder

##php settings nextcloud
cp /etc/php/8.2/apache2/php.ini /etc/php/8.2/apache2/php.ini.bak
Expand Down Expand Up @@ -351,7 +353,7 @@ echo -e "${GREEN}Wait please, nextcloud occ setup is in progress....${ENDCOLOR}"
echo "--------------------------------------------------------------------------------------------------------"
echo "--------------------------------------------------------------------------------------------------------"
cd /var/www/nextcloud
sudo -u www-data php occ maintenance:install --database "mysql" --database-name "$databasename" --database-user "$databaseuser" --database-pass "$databaseuserpasswd" --database-host "localhost:$dbport" --admin-user "$nextroot" --admin-pass "$nextpass" --data-dir "/opt/nextcloud/data/"
sudo -u www-data php occ maintenance:install --database "mysql" --database-name "$databasename" --database-user "$databaseuser" --database-pass "$databaseuserpasswd" --database-host "localhost:$dbport" --admin-user "$nextroot" --admin-pass "$nextpass" --data-dir "$ncdatafolder"
sudo -u www-data php occ config:system:set logtimezone --value="$ltz"
sudo -u www-data php occ config:system:set trusted_domains 1 --value=10.$ipv4network.1
sudo -u www-data php occ app:enable end_to_end_encryption
Expand Down

0 comments on commit 91786f4

Please sign in to comment.