Skip to content

Commit

Permalink
Merge pull request Uberspace#1332 from EV21/nextcloud
Browse files Browse the repository at this point in the history
[Nextcloud] make install command parameters bulletproof
  • Loading branch information
kimdiallo authored Jan 3, 2023
2 parents 29b1c9a + 980e30a commit a00b38d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/guide_nextcloud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ Now, execute the Nextcloud maintenance PHP script ``occ`` with the parameters sh
.. code-block:: console
:emphasize-lines: 1-3
[isabell@stardust html]$ NEXTCLOUD_ADMIN_USER=MyUserName
[isabell@stardust html]$ NEXTCLOUD_ADMIN_PASS=MySuperSecretAdminPassword
[isabell@stardust html]$ MYSQL_PASSWORD=MySuperSecretMySQLPassword
[isabell@stardust html]$ php occ maintenance:install --admin-user "${NEXTCLOUD_ADMIN_USER}" --admin-pass "${NEXTCLOUD_ADMIN_PASS}" --database 'mysql' --database-name "${USER}_nextcloud" --database-user "${USER}" --database-pass "${MYSQL_PASSWORD}" --data-dir "${HOME}/nextcloud_data"
[isabell@stardust html]$ NEXTCLOUD_ADMIN_USER='MyUserName'
[isabell@stardust html]$ NEXTCLOUD_ADMIN_PASS='MySuperSecretAdminPassword'
[isabell@stardust html]$ MYSQL_PASSWORD='MySuperSecretMySQLPassword'
[isabell@stardust html]$ php occ maintenance:install --admin-user="${NEXTCLOUD_ADMIN_USER}" --admin-pass="${NEXTCLOUD_ADMIN_PASS}" --database='mysql' --database-name="${USER}_nextcloud" --database-user="${USER}" --database-pass="${MYSQL_PASSWORD}" --data-dir="${HOME}/nextcloud_data"
Nextcloud was successfully installed
[isabell@stardust html]$
Expand Down Expand Up @@ -249,7 +249,7 @@ Add the following cronjob to your :manual:`crontab <daemons-cron>`:

::

*/5 * * * * sleep $(( 1 + $RANDOM \% 60 )) ; php -f $HOME/html/cron.php > $HOME/logs/nextcloud-cron.log 2>&1
*/5 * * * * sleep $(( 1 + RANDOM % 60 )) ; php -f $HOME/html/cron.php > $HOME/logs/nextcloud-cron.log 2>&1

.. note:: The actual cronjob is preceded by a random sleep of maximum one minute to prevent load peaks every 5 minutes due to simultaneous execution of all cronjobs.

Expand Down

0 comments on commit a00b38d

Please sign in to comment.