diff --git a/templates/template06-nextcloud-db-standalone/Readme.md b/templates/template06-nextcloud-db-standalone/Readme.md index 5fa121d..dbeb95e 100644 --- a/templates/template06-nextcloud-db-standalone/Readme.md +++ b/templates/template06-nextcloud-db-standalone/Readme.md @@ -7,8 +7,6 @@ |File name | Description| | --- | --- | -| `nextcloud-X.Y.Z.tar.bz2` | The installer archive to be downloaded from [here](https://download.nextcloud.com/server/releases/) | -| `nextcloud-X.Y.Z.tar.bz2.md5` | md5 signature of the installer archive to be downloaded from [here](https://download.nextcloud.com/server/releases/) | | `50-server.cnf` | The MariaDB server configuration file | @@ -16,7 +14,6 @@ * Open `Vagrantfile` and change the value of variable `lxd.name`. It makes sense to give the same name as the folder, in this example `nc-db-instance`. * Open `provision.sh` * change the value of variable `MACHINE_HOSTNAME`. It makes sense to give the same name as the folder, plus the domain, in this example `nc-db-instance.localenv.com`. - * change the value of variable `NEXTCLOUD_INSTALLER_ARCHIVE` to match the name of the installer archive you are using. * Run `vagrant up > log/provisioning.log` * Make sure your system is able to resolve the domain name that you specified in variable `MACHINE_HOSTNAME`, for example by adding an entry in `/etc/hosts` * Start using your environment diff --git a/templates/template06-nextcloud-db-standalone/provision.sh b/templates/template06-nextcloud-db-standalone/provision.sh index d540eff..138a855 100644 --- a/templates/template06-nextcloud-db-standalone/provision.sh +++ b/templates/template06-nextcloud-db-standalone/provision.sh @@ -13,9 +13,6 @@ # Fully Qualified Name: ex. "nc.localenv.com" MACHINE_HOSTNAME= -# Nextcloud Installer name (format tar.bz2): ex. "nextcloud-21.0.7.tar.bz2" -NEXTCLOUD_INSTALLER_ARCHIVE= - #### The user must fill these variables - END SYSTEM_USER=usrv @@ -30,7 +27,7 @@ NETWORK_INTERFACE=eth0 -PHP_INI=/etc/php/7.4/apache2/php.ini +#PHP_INI=/etc/php/7.4/apache2/php.ini hostnamectl set-hostname ${MACHINE_HOSTNAME} @@ -63,33 +60,11 @@ ##(cd to the folder to avoid a 'File Not Found' error cd /vagrant/artifacts -md5sum -c ${NEXTCLOUD_INSTALLER_ARCHIVE}.md5 < ${NEXTCLOUD_INSTALLER_ARCHIVE} - -md5sum_exit_status=$? - -cd -- - -echo "Exit status for md5sum check for Nextcloud installer: ${md5sum_exit_status}" - -if [ "${md5sum_exit_status}" == "0" ]; then - echo "Check OK" -else - echo "Check KO" - echo "Aborting" - exit 1 -fi - ## Install the needed packages from apt repositories apt update apt install -y mariadb-server -apt install -y php7.4 - -apt install -y php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-intl - -apt install -y php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip - ## Replace the MariaDB configuration file and restart MariaDB cp /vagrant/artifacts/50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf @@ -107,26 +82,6 @@ echo "END - Create the database" -## Expand the installer archive and move the content to the web server root folder (/var/www) - -echo "START - Expand the installer archive" - -cd /vagrant/artifacts - -tar -xjf ${NEXTCLOUD_INSTALLER_ARCHIVE} - -echo "END - Expand the installer archive" - -## Installing Nextcloud from CLI (https://docs.nextcloud.com/server/stable/admin_manual/installation/command_line_installation.html) -echo "START - Installing Nextcloud from CLI" - -php /vagrant/artifacts/nextcloud/occ maintenance:install --database "mysql"\ - --database-name "${NEXTCLOUD_DB_NAME}"\ - --database-host "${MACHINE_HOSTNAME}"\ - --database-user "${NEXTCLOUD_DB_USER}"\ - --database-pass "${NEXTCLOUD_DB_PASSWORD}"\ - --admin-user "admin"\ - --admin-pass "admin" echo "START - Cleanup" rm -rf /vagrant/artifacts/nextcloud