- clean code
- added man.rst - ready for PR
This commit is contained in:
parent
c34c202a9c
commit
41e7518b49
3 changed files with 120 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh +x
|
||||
#!/bin/sh
|
||||
|
||||
os=$(cat "$__global/explorer/os")
|
||||
os_version=$(cat "$__global/explorer/os_version")
|
||||
|
@ -53,8 +53,6 @@ admin_pass=$(cat "$__object/parameter/admin-pass")
|
|||
domain=$(cat "$__object/parameter/domain")
|
||||
|
||||
# TODO check shasum of tar ball
|
||||
# INSTALL_STATE="$([ -d /var/www/nextcloud ] && cd /var/www/nextcloud && sudo -u www-data php occ status| grep -o true)"
|
||||
# if [ ! "\$INSTALL_STATE" ] || [ ! -z "\$INSTALL_STATE" ]; then
|
||||
cat <<eof
|
||||
INSTALL_STATE=\$([ -d /var/www/nextcloud ] && cd /var/www/nextcloud && sudo -u www-data php occ status| grep -o true)
|
||||
if [ "\$INSTALL_STATE" != "true" ]; then
|
||||
|
|
115
man.rst
Normal file
115
man.rst
Normal file
|
@ -0,0 +1,115 @@
|
|||
cdist-type__ungleich_nextcloud(7)
|
||||
=======================================
|
||||
Application proxy via nginx
|
||||
|
||||
ungleich GmbH <cdist--@--ungleich.ch>
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
This type installs Nextcloud. We suggest to use the type
|
||||
__ungleich_nginx_app_proxy for the nginx configuration.
|
||||
|
||||
|
||||
REQUIRED PARAMETERS
|
||||
-------------------
|
||||
domain
|
||||
where Nextcloud runs
|
||||
|
||||
|
||||
DEFAULT PARAMETERS
|
||||
-------------------
|
||||
admin-pass
|
||||
Nextcloud default admin passwort: nextcloud
|
||||
|
||||
admin-user
|
||||
Nextcloud default admin user: nextcloud
|
||||
|
||||
db-name
|
||||
Nextcloud default database name: nextcloud
|
||||
|
||||
db-pass
|
||||
Nextcloud default password: nextcloud
|
||||
|
||||
db-user
|
||||
Nextcloud default database user: nextcloud
|
||||
|
||||
uri
|
||||
Nextcloud default Uniform Resource Identifier (URI): https://download.nextcloud.com/server/releases/nextcloud
|
||||
|
||||
version
|
||||
Nextcloud default version: 11.0.1
|
||||
|
||||
|
||||
OPTIONAL PARAMETERS
|
||||
-------------------
|
||||
admin-pass
|
||||
Nextcloud admin password
|
||||
|
||||
admin-user
|
||||
Nextcloud user password
|
||||
|
||||
db-name
|
||||
Nextcloud database name
|
||||
|
||||
db-pass
|
||||
Nextcloud password
|
||||
|
||||
db-user
|
||||
Nextcloud database user
|
||||
|
||||
ssl-cert
|
||||
Define the path where the ssl-cert is on the $host
|
||||
|
||||
ssl-key
|
||||
Define the path where the ssl-key is on the $host
|
||||
|
||||
uri
|
||||
Nextcloud Uniform Resource Identifier (URI)
|
||||
|
||||
version
|
||||
Nextcloud version
|
||||
|
||||
If not set the type uses the default parameters.
|
||||
|
||||
BOOLEAN PARAMETERS
|
||||
------------------
|
||||
ssl
|
||||
Enable if you want to use SSL
|
||||
|
||||
ssl-no-redirect
|
||||
Enable if you don't want a redirect to https
|
||||
|
||||
custom-config-from-stdin
|
||||
Insert this configuration from stdin after the generic part
|
||||
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# only required
|
||||
__ungleich_nextcloud --domain test.example.org
|
||||
|
||||
# set a different admin-user and db-user; ssl is needed
|
||||
__ungleich_nextcloud --ssl --admin-user ungleich --db-user ungleich --domain test.example.org
|
||||
|
||||
# custom config
|
||||
__ungleich_nextcloud --domain test.example.org --custom-config-from-stdin << eof
|
||||
|
||||
# some aditional nginx config
|
||||
|
||||
eof
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
- `cdist-type(7) <cdist-type.html>`_
|
||||
|
||||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2017 ungleich GmbH (www.ungleich.ch).
|
||||
Free use of this software is granted under the terms
|
||||
of the GNU General Public License version 3 (GPLv3).
|
4
manifest
4
manifest
|
@ -38,6 +38,10 @@ esac
|
|||
db_pass=$(cat "$__object/parameter/db-pass")
|
||||
db_user=$(cat "$__object/parameter/db-user")
|
||||
db_name=$(cat "$__object/parameter/db-name")
|
||||
db_name=$(cat "$__object/parameter/domain")
|
||||
|
||||
# Hostname
|
||||
__hostname --name "$domain"
|
||||
|
||||
# Install packages
|
||||
for package in php7.0-common php7.0-gd php7.0-json php7.0-pgsql php7.0-curl \
|
||||
|
|
Loading…
Reference in a new issue