72 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
96b2c19823
ncp.sh,SSH.sh: Move root login configuration to SSH.sh
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2024-05-02 02:48:28 +02:00
Tobias Knöppler
f58852ea27
dnsmasq.sh: Fix dns resolv workaround for hosts using resolvconf instead of systemd-resolved
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2024-05-01 15:46:58 +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
Tobias Knöppler
f1f6ca3bc7
Rename TMPDIR environment variables to TEMPDIR to avoid overriding php temp dir.
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-10-18 00:04:01 +02:00
Tobias Knöppler
7e07152dc8
SSH.sh: Don't disable ssh for users during ncp installation
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-04-15 22:14:57 +02:00
Tobias Knöppler
4dd2dcef6a
update.sh: Support some previously excluded apps on LXD/LXC containers
- fail2ban.sh: Use systemd backend for ssh jail (auth.log might not be available)
- SSH.sh: Make sure openssh-server is installed

newly supported on LXC/LXD are:
- nc-autoupdate-ncp
- nc-update
- nc-datadir
- nc-database
- UFW
- nc-audit
- SSH
- fail2ban
- nc-nextcloud
- nc-init
- samba

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-04-15 02:06:01 +02:00
Tobias Knöppler
18058ed366
SSH.sh: Improve output when disabling ssh users
Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
2023-04-05 21:45:07 +02:00
Victor-ray, S
9030882d28
࿓❯ SSH.sh: Added user creation functionality
Signed-off-by: Victor-ray, S <12261439+ZendaiOwl@users.noreply.github.com>

࿓❯ SSH.sh: Added a '-' for the '--append'

Signed-off-by: Victor-ray, S <12261439+ZendaiOwl@users.noreply.github.com>

࿓❯ SSH.sh: Removed chage -d 0 "USER" as it forces an immediate password change after login and signs the user out afterwards

Signed-off-by: Victor-ray, S <12261439+ZendaiOwl@users.noreply.github.com>
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2023-03-26 16:15:56 +02:00
Victor-ray, S
4824cad24e
࿓❯ SSH.sh: Rewrote SSH activation so it allows for user creation and disallows the webadmin to be used
Signed-off-by: Victor-ray, S <12261439+ZendaiOwl@users.noreply.github.com>
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2023-03-26 16:15:51 +02:00
Tobias K
8149493439
SSH: Add option to enable sudo for ssh user.
- Disable root login

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:35 +01:00
Tobias K
bd835dcd82
Fix installation and pipeline errors
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:34 +01:00
thecalcaholic
9975742ff3
SSH.sh: Enable user when configuring SSH
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
2022-10-03 23:23:17 +02:00
Tobias K
0759aeaaae SSH.sh: Reenable pi user if selected in SSH 2022-09-30 12:32:50 +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 Knöppler
7af7582fff
Create releases from GH workflow (#1507)
- Implement lxd-build GH workflow
- Implement GH workflow for building armbian and raspberry pi images
- Implement release GH workflow
2022-07-20 00:25:19 +02:00
Tobias K
9a2e631e2b dnsmasq.sh: Fix RPI build 2022-07-17 20:25:35 +02:00
Tobias K
82beb6eeaf dnsmasq.sh: Revert dnsmasq workaround 2022-07-17 19:38:26 +02:00
Tobias K
99cc9e610c dnsmasq.sh: Don't use update-rc.d for systemd-resolved 2022-07-17 19:18:10 +02:00
Tobias K
23fa33b638 dnsmasq.sh: Simplify dnsmasq workaround 2022-07-17 17:29:43 +02:00
Tobias K
0ce9d1175b dnsmasq.sh: Simplify dnsmasq workaround 2022-07-17 17:18:42 +02:00
Tobias K
2934a7a374 dnsmasq.sh: Fix dnsmasq workaround 2022-07-17 17:13:12 +02:00
Tobias K
a2b63156b6 dnsmasq.sh: Fix bug in dnsmasq workaround 2022-07-17 16:58:23 +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
99a3c45592 dnsmasq.sh: Workaround dnsmasq startup failure bug
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
2022-03-30 17:19:50 -06:00
nachoparker
21b7fe70f0 SSH: cannot check for default password because of Debian bug #1003151
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2022-03-04 17:13:34 -07:00
nachoparker
a834ba0013 samba: fix usernames with spaces
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2022-03-02 14:53:28 -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
bcd850cc3f letsencrypt: fix invalid arithmetic operator error
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-12-13 13:01:39 -07: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
ec94e6fb80 nc-static-IP: use ifdown/ifup
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-18 12:00:33 -06:00
nachoparker
06ffb1eecd nc-static-IP: make sure dhclient is no longer running
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-18 08:09:10 -06:00
nachoparker
74ed53f2de letsencrypt: hardcode cert name to avoid -0001 paths
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-18 08:01:49 -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
nachoparker
cc3f3366f1 letsencrypt: keep original cert name
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-10-11 15:55:33 -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
b067844550 add get_ip function
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-27 18:27:44 -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
f3e3b01ab5 letsencrypt: improve active status check
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-20 09:59:35 -06:00
nachoparker
6290c1f472 nc-static-IP: take into account httpsonly
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-13 14:07:06 -06:00
nachoparker
c10d4bd8fb upgrade to NC21.0.4
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-09-12 16:55:46 -06:00
nachoparker
b8c14093ad letsencrypt: ability to disable it and roll back to self-signed certificates
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-08-09 17:25:55 -06: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
Huizerd
7aef967f09 Namecheap dynamic DNS client
Signed-off-by: Huizerd <15855769+Huizerd@users.noreply.github.com>
2021-05-12 21:49:42 -06:00
nachoparker
20bd14fe7b wizard: fix letsencrypt empty email
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2021-01-17 20:02:26 -07:00
nachoparker
92156694f6 pre-initialize docker image
Signed-off-by: nachoparker <nacho@ownyourbits.com>
2020-11-27 14:54:34 -07:00