42 Commits

Author SHA1 Message Date
Tobias Knöppler
9890d68532
91-ncp.cnf.sh: Increase allowed packet size for mysqldump
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2024-09-24 17:18:41 +02:00
Tobias Knöppler
26076e4212
build-SD-armbian.sh: Use latest commit of armbian/build
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2024-03-27 13:40:14 +01:00
Tobias K
641685f5c7
v1.53.1.sh: Prevent breaking the web interface during apache2 reload
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2024-01-25 22:55:26 +01:00
Tobias K
308aef9b2b
ncp.sh: Move ncp.conf to ncp-template
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2024-01-25 00:31:37 +01:00
Jürgen
6750497924
Improved default for php max children (#1738)
Fixes #1624
2023-04-24 11:15:23 +02:00
Tobias Knöppler
902226d5da
91-ncp.cnf.sh: Increase max_allowed_packet to avoid errors on large sql queries
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-04-15 23:59:48 +02:00
Tobias Knöppler
ab501b3f51
ncp-metrics.cfg.sh: Exclude snapshots from backup monitoring on LXD/LXC
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-04-15 02:06:25 +02:00
Tobias Knöppler
cfc4d57306
opcache.ini.sh: Disable opcache for cli
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-22 01:21:07 +01:00
Tobias Knöppler
e8352bd10e
ncp-restore: Make sure to clear opcache before executing ncc commands
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-22 01:21:07 +01:00
Tobias Knöppler
56e1ff45ee
opcache.ini.sh: Increase interned_strings_buffer as recommended by NC
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-22 01:21:05 +01:00
Tobias Knöppler
87e3fc883e
opcache.ini.sh: include potential fix for opcache jit segfaults
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-22 01:21:04 +01:00
Tobias Knöppler
07fd406030
opcache.ini.sh: Ensure opcache temp dir exists
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-22 01:21:04 +01:00
Tobias K
35c775be2f
opcache.ini.sh: Fix template populating /data/... during docker build
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-08 21:16:38 +01:00
Tobias K
71f8a2ef81
ncp-restore: Use new default data directory location when resetting datadir
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-08 21:16:37 +01:00
Tobias K
23f698da20
000ncp: Install templates during docker startup
- docker-build.yml: Fix update-test job

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-01-08 21:16:36 +01:00
thecalcaholic
4049a4b07d
90-ncp.cnf.sh: Fix /data-ro being used as db directory outside of installation
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-28 16:14:00 +02:00
thecalcaholic
1a80ecbfc9
90-ncp.cnf.sh: Don't use /data-ro for database path
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-28 16:13:57 +02:00
thecalcaholic
2589f49377
notify_push: Automatically restart notify_push on error
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-27 20:20:48 +02:00
thecalcaholic
04bb842504
Revert "opcache.ini.sh: Add workaround for segfault when using PHP"
This reverts commit 546fd0d46d6295478e346cbda985cfb454e44469.
2022-09-22 15:13:19 +02:00
thecalcaholic
546fd0d46d
opcache.ini.sh: Add workaround for segfault when using PHP
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-22 12:27:39 +02:00
thecalcaholic
199dcc014f
ncp-templates/*: Remove side effects from ncp-templates
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-16 01:42:36 +02:00
thecalcaholic
a97c73d420
ncp-templates/pool.d.www.conf.sh: Fix php socket path
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-16 01:35:06 +02:00
thecalcaholic
ea75a97a91
ncp-templates: Fix erroneous outputs messing up config files
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-16 00:37:16 +02:00
thecalcaholic
7225c2c898
nc-limits.sh: Migrate installation of www.conf to ncp template
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-16 00:16:25 +02:00
Tobias Knöppler
b675d61e61
Upgrade to PHP 8.1 when installing NC >= 24 (#1554)
* Update nextcloud to 24.0.4
* ncp-update-nc: Upgrade php to version 8.1 when installing NC >= 24
* ncp-update-nc: Use /etc/shadow workaround for installing systemd
* ncp-update-nc: Run nc-limits after php upgrade
* ncp-update-nc: Rollback after failed php upgrade
* ncp-update-nc: Add success message
* ncp-update-nc: Prevent installation of NC >= 24 on debian 10/PHP <= 7.3
* lamp.sh: Install php8.1 from sury.org
* lamp.sh: Use /etc/shadow workaround for installing systemd
* Dockerfile: Install wget, ca-certificates, lsb-release and procps before installing lamp.sh
* Dockerfile: Make sure, ncp-templates are available when installing lamp.sh
* Migrate all scripts to use template for writing opcache.ini and get_nc_config_value for retrieving datadir
* nc-nextcloud.sh Fix crash if nc-datadir has not been installed yet
* opcache.ini.sh: Don't try to get tmpl values from nc-datadir in containers
2022-09-15 17:31:15 +02:00
Tobias K
20eb4a6b06 metrics.sh: Fix set -u in calling script causing failure 2022-07-25 18:48:36 +02:00
Tobias K
f3fb20dede
ncp-templates/*: Use is_docker function for docker detection
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2022-04-18 20:10:11 +02:00
Tobias K
fa0fbffb04
metrics.sh: Add docker support
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2022-04-08 14:52:36 +02:00
Tobias K
0e694329d2
metrics.sh: Install and manage ncp-metrics-exporter
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2022-04-08 09:36:02 +02:00
nachoparker
532a6a8bb6 letsencrypt: sync ncp and nc cert paths
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-27 15:18:57 -06:00
nachoparker
36c1f465fc letsencrypt: disable also ncp web certs if OFF
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-21 12:47:38 -06:00
nachoparker
c75db63260 letsencrypt: take into account the possibility of the ncp-nextcloud folder being used
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-14 13:48:40 -06:00
nachoparker
35a3a54845 letsencrypt: favor most recent cert if there are many
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-14 11:08:05 -06:00
Tobias Knöppler
de104a5da8 Make templating safer and more verbose (#1343)
* letsencrypt: fix active status check

Signed-off-by: nachoparker <nacho@ownyourbits.com>

* letsencrypt: take into account duplicate domains ending in -0001

Signed-off-by: nachoparker <nacho@ownyourbits.com>

* letsencrypt: fix renewal with httpsonly enabled

Signed-off-by: nachoparker <nacho@ownyourbits.com>

* fix inverted template logic for docker

Signed-off-by: nachoparker <nacho@ownyourbits.com>

* library.sh: Move templating to separate function

- Backup old file before templating (and restore on failure)
- Use stderr in the template for debug/info output

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* library.sh: Fix syntax error

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* library.sh: Only fallback to default config if explicitly allowed

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Set cert-name

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Use certificate named ncp-nextcloud if available

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Support multiple, comma separated domains in field "OTHER_DOMAIN"

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Fix path resolution for certificates

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Improve warning about max trusted domains reached

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Fix max trusted domains check

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Fix splitting of domain string by comma

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Fix splitting of domain string to array

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* adjustments for docker/lxc

Signed-off-by: nachoparker <nacho@ownyourbits.com>

Co-authored-by: nachoparker <nacho@ownyourbits.com>
2021-10-07 13:29:00 -06:00
nachoparker
26edf1f7b0 build: add LXC/LXD support
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-30 22:48:19 -06:00
nachoparker
4039da90a9 letsencrypt: take into account duplicate domains ending in -0001
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-22 09:18:45 -06:00
nachoparker
2b51476630 fix inverted template logic for docker
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-22 00:48:57 -06:00
nachoparker
1046a2413b letsencrypt: fix active status check
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-22 00:48:56 -06:00
nachoparker
c10d4bd8fb upgrade to NC21.0.4
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-12 16:55:46 -06:00
Tobias K
4f29d94a02
nextcloud.conf.sh: Prevent apache config test output to end up in generated template
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2021-08-16 21:26:08 +02:00
Tobias K
e49203249b nextcloud.conf.sh: Allow any user name for metrics endpoint and fix docker build
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

nextcloud.conf.sh: Fix apps overwriting each other during templating

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

nextcloud.conf.sh: Make --default mode failsafe (don't expect apps to be installed)

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

nextcloud.conf.sh: Allow any user name for metrics endpoint

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

nextcloudpi/Dockerfile: Copy the templates directory to the container

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

lamp/Dockerfile: Copy the templates directory to the container

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

install.sh: Ensure templates are available before executing nc-nextcloud.sh

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2021-08-09 17:16:35 -06:00
Tobias Knöppler
b8a990e264
Add ncp-app for prometheus (system) metrics
* metrics.{sh,cfg}: Implement ncp-app for prometheus (system) metrics

letsencrypts.sh, nc-nextcloud.sh, nextcloud.conf.sh: Introduce templating/generator concept to allow multiple ncp apps to edit the same file without conflicts

library.sh: Add convenience function find_app_param

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Remove commented code

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.cfg: Deactivate by default

- Add title, description and remove TODO entries

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Restart apache after enabling proxy_http

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* update.sh: Update ncp-templates directory during updates

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* update.sh: Copy ncp-templates directory, not just its content

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh,update.sh: Disable metrics in docker for now

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Disable prometheus-node-exporter via systemctl

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Move apache mod configuration to updates

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.cfg: Remove invalid parameter type

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.sh: Create /etc/default/prometheus-node-exporter via heredoc

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Prevent template parsing error if metrics.sh is disabled (i.e. on docker)

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* metrics.cfg: Add info directing users to my preconfigured ncp dashboard

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* Various fixes

- metrics.sh: Fix is_active function always returning 1
- metrics.sh: Fix apache2 reload potentially interrupting web ui
- nc-nextcloud.sh: exit if nextcloud.conf templating fails
- various readability and code style improvements

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* letsencrypt.sh: Use consistent return codes in tmpl_letsencrypt_domain

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Remove obsolete return code escape

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* nextcloud.conf.sh: Ensure that the snakeoil self-signed cert exists before enabling it

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>

* updates/1.36.4.sh: Reload apache in the background instead of restarting it blockingly

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2021-08-02 15:12:56 -06:00