38 Commits

Author SHA1 Message Date
Tobias Knöppler
1a210e9f12
Replace 'NextCloudPi' with 'NextcloudPi' in localization and code comments
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2024-08-06 14:34:30 +02:00
Tobias K
b54d332a09
rename nextcloud.conf to 001-nextcloud.conf to force it to be considered before ncp.conf
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2024-01-26 01:24:36 +01:00
thecalcaholic
82f938c52b
metrics.sh: Fix incorrect return code in relaod_metrics_config if ncp-metrics-export was disabled
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-09-28 16:18:53 +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
b88ce441e4 nc-datadir.sh: Add success message 2022-08-21 15:21:05 +02:00
thecalcaholic
0e67ccc8bb ncp.cfg: Update NC to 24.0.3
ncp-app,nextcloudpincp-previews: Mark as compatible with NC 24
2022-08-12 14:26:32 +02:00
thecalcaholic
c3f4e766be 1.47.0.sh: Fix ncp-update if prometheus-node-exporter was not installed before 2022-07-28 09:37:47 +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
13bd759911 Fix RPI build 2022-07-17 00:37:56 +00:00
Tobias K
afbf651412
dnsmasq, metrics: Fix docker build issues
dnsmasq.sh: Skip systemd-resolved workaround on docker
metrics.sh: Fix service installation on docker

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2022-04-19 01:31:24 +02:00
Tobias K
07e32739d0
metrics.sh: Fix docker detection issue
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2022-04-18 18:25:29 +02:00
Tobias K
d42a0c8cd5
metrics.sh: Reinstall metrics when upgrading
- Upgrade ncp-metrics-exporter to v1.1.0
- Install prometheus-node-exporter-collectors when dist-upgrading from buster

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2022-04-08 15:07:34 +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
f473f737fd nc-hdd-monitor: fix Bullseye service name
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2022-03-04 15:56:39 -07:00
nachoparker
9bf5ff032c update to Debian 11 Bullseye
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2022-03-02 14:53:24 -07:00
nachoparker
3118a92cef install: skip dphys-swapfile if BTRFS
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-11-04 13:34:02 -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
Tobias K
b8402459b1 metrics.sh: Fix inverted is_active result
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2021-08-09 17:16:38 -06:00
Tobias K
fb102d233c metrics.sh: Fix USER variable being ignored
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2021-08-09 17:16:38 -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
nachoparker
117b8ea9d9 nc-automount: udiskie verbose output
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-01-20 06:47:08 -07:00
nachoparker
dda010bed4 nc-ramlogs: pin version
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2020-08-02 09:57:57 -06:00
nachoparker
0c538aef3c add notify_admin functionality
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2020-02-04 20:29:03 -07:00
nachoparker
6359ca307d nc-ramlogs: disable armbian-ramlog when inactive
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2020-01-14 09:40:24 -07:00
nachoparker
d17fe03fb9 build: fix changed log2ram path
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2019-08-23 19:53:47 -06:00
nachoparker
53d02fe96d nc-hdd-monitor: fix detection
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2019-07-06 14:48:54 -06:00
nachoparker
194d11101b create UPDATE config section 2019-04-04 19:28:33 -06:00
nachoparker
0c95243d8f unattended upgrades: update labels 2019-03-10 23:39:01 -06:00
nachoparker
743cb24610 nc-automount: fix NFS delay 2019-02-15 16:38:50 -07:00
nachoparker
34cba9f528 nc-automount: add delays to some services in a persistent way 2019-01-14 20:53:45 -07:00
nachoparker
6fb9c9b906 nc-hdd-test: try to detect device type if auto doesnt work 2019-01-14 19:09:04 -07:00
nachoparker
389ed0cfe6 nc-ramlog: adapt to armbian 2019-01-14 18:17:42 -07:00
nachoparker
9eaab31e48 add NCP Nextcloud app 2019-01-12 10:57:05 -07:00
nachoparker
6d358f0c5a nc-hdd-test: avoid systemd 2019-01-12 10:55:05 -07:00
nachoparker
9de1f51a3d build: stop at any error 2019-01-09 21:56:42 -07:00
nachoparker
d5c1f0058b rework to use JSON based cfg and more 2019-01-04 18:14:52 -07:00