Hi,
I am running into trouble with my Nextcloudpi installation on Odroid M1 running armbian.
Trying to get my head into this for a couple of days now, I would need some help to identify the root cause.
Status quo:
- Running latest armbian on Odroid M1, booting well off SD
- Armbian can be Update with
sudo apt update
andsudo apt dist-upgrade
without issues resulting inLinux odroidm1 6.1.12-rk3568-odroid #23.02.2 SMP PREEMPT Sat Feb 18 00:05:38 UTC 2023 aarch64 GNU/Linux
- Itβs based on debian bullseye as requested per installer requirements
uho@odroidm1:~$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
- Following the CURL installation methode, I modified the
install.sh
uncommenting the line about debugging toDBG=x
- Verification on a x86 VM show that the installer runs well on plain debian 11, problem expected in armbian platform
- The install.sh kicks out at an unknown location for unknown reason (some PAM authentication stuff not working out)
----%< SNIP ----
Site ncp-activation already enabled
+ id -u ncp
+ echo -e 'ownyourbits\nownyourbits'
+ passwd ncp
New password: Retype new password: passwd: password updated successfully
+ is_docker
+ [[ -f /.dockerenv ]]
+ [[ -f /.docker-image ]]
+ [[ '' == 1 ]]
+ is_lxc
+ grep -q container=lxc /proc/1/environ
+ chsh -s /usr/sbin/nologin ncp
Password:
chsh: PAM: Authentication failure
+ rm -rf /tmp/nextcloudpi.fE33oo
Looking at the install script, I am totally lost, where this might happen.
Maybe someone familiar with the installation script(s) can help me getting my installation working out.
THX
Uwe
uho@odroidm1:~$ sudo bash install.sh | tee ncp_install.log
++ mktemp -d /tmp/nextcloudpi.XXXXXX
+ TMPDIR=/tmp/nextcloudpi.fE33oo
+ trap 'rm -rf "/tmp/nextcloudpi.fE33oo"' 0 1 2 3 15
+ [[ 0 -ne 0 ]]
+ export PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ type mysqld
+ echo '>>> WARNING: existing mysqld configuration will be changed <<<'
+ type mysqld
>>> WARNING: existing mysqld configuration will be changed <<<
+ mysql -e 'use nextcloud'
+ echo 'Deby Get dependencies'
+ apt-get update
Deby Get dependencies
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://deb.debian.org/debian bullseye-backports InRelease
Hit:4 http://security.debian.org bullseye-security InRelease
Hit:5 https://packages.sury.org/php bullseye InRelease
Hit:6 http://mirrors.xtom.de/armbian bullseye InRelease
Reading package lists...
+ apt-get install --no-install-recommends -y git ca-certificates sudo lsb-release wget
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20210119).
git is already the newest version (1:2.30.2-1+deb11u2).
lsb-release is already the newest version (11.1.0).
sudo is already the newest version (1.9.5p2-3+deb11u1).
wget is already the newest version (1.21-1+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ [[ '' == '' ]]
+ echo 'Getting build code...'
+ CODE_DIR=/tmp/nextcloudpi.fE33oo/nextcloudpi
Getting build code...
+ git clone -b master https://github.com/nextcloud/nextcloudpi.git /tmp/nextcloudpi.fE33oo/nextcloudpi
Cloning into '/tmp/nextcloudpi.fE33oo/nextcloudpi'...
remote: Enumerating objects: 14363, done.
remote: Counting objects: 100% (437/437), done.
remote: Compressing objects: 100% (272/272), done.
remote: Total 14363 (delta 214), reused 328 (delta 161), pack-reused 13926
Receiving objects: 100% (14363/14363), 8.12 MiB | 8.45 MiB/s, done.
Resolving deltas: 100% (10006/10006), done.
+ cd /tmp/nextcloudpi.fE33oo/nextcloudpi
+ echo -e '\nInstalling NextCloudPi...'
Installing NextCloudPi...
+ source etc/library.sh
++ export CFGDIR=/usr/local/etc/ncp-config.d
++ CFGDIR=/usr/local/etc/ncp-config.d
++ export BINDIR=/usr/local/bin/ncp
++ BINDIR=/usr/local/bin/ncp
++ export NCDIR=/var/www/nextcloud
++ NCDIR=/var/www/nextcloud
++ export ncc=/usr/local/bin/ncc
++ ncc=/usr/local/bin/ncc
++ export NCPCFG=etc/ncp.cfg
++ NCPCFG=etc/ncp.cfg
+++ dpkg --print-architecture
++ export ARCH=arm64
++ ARCH=arm64
++ [[ arm64 =~ ^(armhf|arm)$ ]]
++ [[ arm64 == \a\r\m\6\4 ]]
++ ARCH=aarch64
++ [[ aarch64 == \a\m\d\6\4 ]]
++ export SYSTEMD_PAGER=
++ SYSTEMD_PAGER=
++ [[ -f etc/ncp.cfg ]]
++ [[ -f etc/ncp.cfg ]]
+++ ps -p 1 --no-headers -o %c
++ [[ systemd == \s\y\s\t\e\m\d ]]
++ [[ -d /run/systemd/system ]]
++ [[ -d /run/systemd/system ]]
++ INIT_SYSTEM=systemd
++ export INIT_SYSTEM
++ command -v jq
+++ jq -r .nextcloud_version
++ NCLATESTVER=26.0.1
+++ jq -r .php_version
++ PHPVER=8.1
+++ jq -r .release
++ RELEASE=bullseye
++ grep -Eh '^deb ' /etc/apt/sources.list
++ grep bullseye-security
++ RELEASE=bullseye-security
++ command -v ncc
+++ ncc status
+++ grep version:
+++ awk '{ print $3 }'
++ NCVER=26.0.1.1
+ check_distro etc/ncp.cfg
+ local cfg=etc/ncp.cfg
++ jq -r .release etc/ncp.cfg
+ local supported=bullseye
+ grep -q bullseye /dev/fd/63
++ lsb_release -sc
+ return 0
+ touch /.ncp-image
+ mkdir -p /usr/local/etc/ncp-config.d/
+ cp etc/ncp-config.d/nc-nextcloud.cfg /usr/local/etc/ncp-config.d/
+ cp etc/library.sh /usr/local/etc/
+ cp etc/ncp.cfg /usr/local/etc/
+ cp -r etc/ncp-templates /usr/local/etc/
+ install_app lamp.sh
+ local ncp_app=lamp.sh
+ [[ -f lamp.sh ]]
+ local script=lamp.sh
++ basename lamp.sh .sh
+ local ncp_app=lamp
+ unset install
+ source lamp.sh
++ APTINSTALL='apt-get install -y --no-install-recommends'
++ export DEBIAN_FRONTEND=noninteractive
++ DEBIAN_FRONTEND=noninteractive
+ echo 'Installing lamp'
Installing lamp
+ install
+ set -x
+ wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
--2023-06-22 15:37:35-- https://packages.sury.org/php/apt.gpg
Resolving packages.sury.org (packages.sury.org)... 138.199.37.230, 2400:52e0:1e00::1080:1
Connecting to packages.sury.org (packages.sury.org)|138.199.37.230|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1769 (1.7K) [application/octet-stream]
Saving to: β/etc/apt/trusted.gpg.d/php.gpgβ
/etc/apt/trusted.gpg.d/php.gpg 100%[==========================================================>] 1.73K --.-KB/s in 0s
2023-06-22 15:37:35 (41.9 MB/s) - β/etc/apt/trusted.gpg.d/php.gpgβ saved [1769/1769]
+ echo 'deb https://packages.sury.org/php/ bullseye main'
+ apt-get update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease
Hit:5 https://packages.sury.org/php bullseye InRelease
Hit:6 http://xogium.performanceservers.nl/apt bullseye InRelease
Reading package lists...
+ apt-get install -y --no-install-recommends apt-utils cron curl
Reading package lists...
Building dependency tree...
Reading state information...
apt-utils is already the newest version (2.2.4).
cron is already the newest version (3.0pl1-137).
curl is already the newest version (7.74.0-1.3+deb11u7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ ls -l /var/lock
lrwxrwxrwx 1 root root 9 Feb 12 16:39 /var/lock -> /run/lock
+ apt-get install -y --no-install-recommends apache2
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.56-1~deb11u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ mkdir -p /run/lock
+ apache2ctl -V
Server version: Apache/2.4.56 (Debian)
Server built: 2023-04-02T03:06:01
Server's Module Magic Number: 20120211:126
Server loaded: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.45 2021-06-15
Compiled using: APR 1.7.0, APR-UTIL 1.6.1, PCRE 8.39 2016-06-14
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_PROC_PTHREAD_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"
+ id -u systemd-resolve
102
+ install_with_shadow_workaround --no-install-recommends systemd
+ restore_shadow=true
+ [[ -L /etc/shadow ]]
+ restore_shadow=false
+ [[ false == \f\a\l\s\e ]]
+ DEBIAN_FRONTEND=noninteractive
+ apt-get install -y --no-install-recommends systemd
Reading package lists...
Building dependency tree...
Reading state information...
systemd is already the newest version (247.3-7+deb11u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ [[ false == \f\a\l\s\e ]]
+ trap - EXIT
+ apt-get install -y --no-install-recommends -t bullseye-security php8.1 php8.1-curl php8.1-gd php8.1-fpm php8.1-cli php8.1-opcache php8.1-mbstring php8.1-xml php8.1-zip php8.1-fileinfo php8.1-ldap php8.1-intl php8.1-bz2
Reading package lists...
Building dependency tree...
Reading state information...
php8.1 is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-bz2 is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-cli is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-common is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-curl is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-fpm is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-gd is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-intl is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-ldap is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-mbstring is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-opcache is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-xml is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
php8.1-zip is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ mkdir -p /run/php
+ local DBPASSWD=default
+ echo -e '[client]\npassword=default'
+ chmod 600 /root/.my.cnf
+ debconf-set-selections
+ debconf-set-selections
+ apt-get install -y --no-install-recommends mariadb-server php8.1-mysql
Reading package lists...
Building dependency tree...
Reading state information...
mariadb-server is already the newest version (1:10.5.19-0+deb11u2).
php8.1-mysql is already the newest version (8.1.20-1+0~20230609.43+debian11~1.gbpb5cd38).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ mkdir -p /run/mysqld
+ chown mysql /run/mysqld
+ install_template apache2/http2.conf.sh /etc/apache2/conf-available/http2.conf --defaults
+ local template=apache2/http2.conf.sh
+ local target=/etc/apache2/conf-available/http2.conf
++ mktemp
+ local bkp=/tmp/tmp.W4JiF58Ps7
+ echo 'Installing template '\''apache2/http2.conf.sh'\''...'
Installing template 'apache2/http2.conf.sh'...
++ dirname /etc/apache2/conf-available/http2.conf
+ mkdir -p /etc/apache2/conf-available
+ [[ -f /etc/apache2/conf-available/http2.conf ]]
+ cp -a /etc/apache2/conf-available/http2.conf /tmp/tmp.W4JiF58Ps7
+ [[ --defaults == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/apache2/http2.conf.sh --defaults
+ rm /tmp/tmp.W4JiF58Ps7
+ install_template php/opcache.ini.sh /etc/php/8.1/mods-available/opcache.ini --defaults
+ local template=php/opcache.ini.sh
+ local target=/etc/php/8.1/mods-available/opcache.ini
++ mktemp
+ local bkp=/tmp/tmp.xX2hFTPrwJ
+ echo 'Installing template '\''php/opcache.ini.sh'\''...'
Installing template 'php/opcache.ini.sh'...
++ dirname /etc/php/8.1/mods-available/opcache.ini
+ mkdir -p /etc/php/8.1/mods-available
+ [[ -f /etc/php/8.1/mods-available/opcache.ini ]]
+ cp -a /etc/php/8.1/mods-available/opcache.ini /tmp/tmp.xX2hFTPrwJ
+ [[ --defaults == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/php/opcache.ini.sh --defaults
INFO: Restoring template to default settings
+ rm /tmp/tmp.xX2hFTPrwJ
+ a2enmod http2
Module http2 already enabled
+ a2enconf http2
Conf http2 already enabled
+ a2enmod proxy_fcgi setenvif
Considering dependency proxy for proxy_fcgi:
Module proxy already enabled
Module proxy_fcgi already enabled
Module setenvif already enabled
+ a2enconf php8.1-fpm
Conf php8.1-fpm already enabled
+ a2enmod rewrite
Module rewrite already enabled
+ a2enmod headers
Module headers already enabled
+ a2enmod dir
Module dir already enabled
+ a2enmod mime
Module mime already enabled
+ a2enmod ssl
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled
+ echo 'ServerName localhost'
+ apt-get install -y --no-install-recommends ssl-cert
Reading package lists...
Building dependency tree...
Reading state information...
ssl-cert is already the newest version (1.1.0+nmu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ install_template mysql/90-ncp.cnf.sh /etc/mysql/mariadb.conf.d/90-ncp.cnf --defaults
+ local template=mysql/90-ncp.cnf.sh
+ local target=/etc/mysql/mariadb.conf.d/90-ncp.cnf
++ mktemp
+ local bkp=/tmp/tmp.rI5TpaCLB0
+ echo 'Installing template '\''mysql/90-ncp.cnf.sh'\''...'
Installing template 'mysql/90-ncp.cnf.sh'...
++ dirname /etc/mysql/mariadb.conf.d/90-ncp.cnf
+ mkdir -p /etc/mysql/mariadb.conf.d
+ [[ -f /etc/mysql/mariadb.conf.d/90-ncp.cnf ]]
+ cp -a /etc/mysql/mariadb.conf.d/90-ncp.cnf /tmp/tmp.rI5TpaCLB0
+ [[ --defaults == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh --defaults
INFO: Restoring template to default settings
+ rm /tmp/tmp.rI5TpaCLB0
+ install_template mysql/91-ncp.cnf.sh /etc/mysql/mariadb.conf.d/91-ncp.cnf --defaults
+ local template=mysql/91-ncp.cnf.sh
+ local target=/etc/mysql/mariadb.conf.d/91-ncp.cnf
++ mktemp
+ local bkp=/tmp/tmp.kBavTahfla
+ echo 'Installing template '\''mysql/91-ncp.cnf.sh'\''...'
Installing template 'mysql/91-ncp.cnf.sh'...
++ dirname /etc/mysql/mariadb.conf.d/91-ncp.cnf
+ mkdir -p /etc/mysql/mariadb.conf.d
+ [[ -f /etc/mysql/mariadb.conf.d/91-ncp.cnf ]]
+ cp -a /etc/mysql/mariadb.conf.d/91-ncp.cnf /tmp/tmp.kBavTahfla
+ [[ --defaults == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/mysql/91-ncp.cnf.sh --defaults
INFO: Restoring template to default settings
+ rm /tmp/tmp.kBavTahfla
+ [[ -f /run/mysqld/mysqld.pid ]]
+ :
+ [[ -S /run/mysqld/mysqld.sock ]]
+ break
+ cd /tmp
+ mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
stty: 'standard input': Inappropriate ioctl for device
Enter current password for root (enter for none):
stty: 'standard input': Inappropriate ioctl for device
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] Enabled successfully!
Reloading privilege tables..
... Success!
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] stty: 'standard input': Inappropriate ioctl for device
New password:
Re-enter new password:
stty: 'standard input': Inappropriate ioctl for device
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] ... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] ... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] - Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] ... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
+ install_app bin/ncp/CONFIG/nc-nextcloud.sh
+ local ncp_app=bin/ncp/CONFIG/nc-nextcloud.sh
+ [[ -f bin/ncp/CONFIG/nc-nextcloud.sh ]]
+ local script=bin/ncp/CONFIG/nc-nextcloud.sh
++ basename bin/ncp/CONFIG/nc-nextcloud.sh .sh
+ local ncp_app=nc-nextcloud
+ unset install
+ source bin/ncp/CONFIG/nc-nextcloud.sh
++ DBADMIN=ncadmin
++ REDIS_MEM=3gb
++ APTINSTALL='apt-get install -y --no-install-recommends'
++ export DEBIAN_FRONTEND=noninteractive
++ DEBIAN_FRONTEND=noninteractive
+ echo 'Installing nc-nextcloud'
Installing nc-nextcloud
+ install
+ [[ -f /usr/lib/systemd/system/nc-provisioning.service ]]
+ return 0
+ run_app_unsafe bin/ncp/CONFIG/nc-nextcloud.sh
+ local script=bin/ncp/CONFIG/nc-nextcloud.sh
++ basename bin/ncp/CONFIG/nc-nextcloud.sh .sh
+ local ncp_app=nc-nextcloud
+ local cfg_file=/usr/local/etc/ncp-config.d/nc-nextcloud.cfg
+ local log=/var/log/ncp.log
+ [[ -f bin/ncp/CONFIG/nc-nextcloud.sh ]]
+ touch /var/log/ncp.log
+ chmod 640 /var/log/ncp.log
+ chown root:www-data /var/log/ncp.log
+ echo 'Running nc-nextcloud'
Running nc-nextcloud
++ date
+ echo '[ nc-nextcloud ] (Thu 22 Jun 2023 03:38:24 PM CEST)'
+ unset configure
+ source bin/ncp/CONFIG/nc-nextcloud.sh
++ DBADMIN=ncadmin
++ REDIS_MEM=3gb
++ APTINSTALL='apt-get install -y --no-install-recommends'
++ export DEBIAN_FRONTEND=noninteractive
++ DEBIAN_FRONTEND=noninteractive
+ [[ -f /usr/local/etc/ncp-config.d/nc-nextcloud.cfg ]]
++ cat /usr/local/etc/ncp-config.d/nc-nextcloud.cfg
+ local 'cfg={
"id": "nc-nextcloud",
"name": "Nc-nextcloud",
"title": "nc-nextcloud",
"description": "Install any NextCloud version",
"info": "WARNING: this will completely wipe out your current instance",
"infotitle": "",
"params": [
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
},
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "768M",
"suggest": "768M"
},
{
"id": "MAXTRANSFERTIME",
"name": "Maximum transfer time",
"value": "3600",
"suggest": "3600"
}
]
}'
++ jq '.params | length'
+ local len=4
+ (( i = 0 ))
+ (( i < len ))
++ jq -r '.params[0].id'
+ local var=VER
++ jq -r '.params[0].value'
+ local val=26.0.1
+ eval VER=26.0.1
++ VER=26.0.1
+ (( i++ ))
+ (( i < len ))
++ jq -r '.params[1].id'
+ local var=MAXFILESIZE
++ jq -r '.params[1].value'
+ local val=10G
+ eval MAXFILESIZE=10G
++ MAXFILESIZE=10G
+ (( i++ ))
+ (( i < len ))
++ jq -r '.params[2].id'
+ local var=MEMORYLIMIT
++ jq -r '.params[2].value'
+ local val=768M
+ eval MEMORYLIMIT=768M
++ MEMORYLIMIT=768M
+ (( i++ ))
+ (( i < len ))
++ jq -r '.params[3].id'
+ local var=MAXTRANSFERTIME
++ jq -r '.params[3].value'
+ local val=3600
+ eval MAXTRANSFERTIME=3600
++ MAXTRANSFERTIME=3600
+ (( i++ ))
+ (( i < len ))
+ tee -a /var/log/ncp.log
+ configure
+ cd /var/www/
+ local URL=https://download.nextcloud.com/server/releases/nextcloud-26.0.1.tar.bz2
+ echo 'Downloading Nextcloud 26.0.1...'
Downloading Nextcloud 26.0.1...
+ wget -q https://download.nextcloud.com/server/releases/nextcloud-26.0.1.tar.bz2 -O nextcloud.tar.bz2
+ rm -rf nextcloud
+ echo 'Installing Nextcloud 26.0.1...'
Installing Nextcloud 26.0.1...
+ tar -xf nextcloud.tar.bz2
+ rm nextcloud.tar.bz2
+ local ocpath=/var/www/nextcloud
+ local htuser=www-data
+ local htgroup=www-data
+ local rootuser=root
+ printf 'Creating possible missing Directories\n'
Creating possible missing Directories
+ mkdir -p /var/www/nextcloud/data
+ mkdir -p /var/www/nextcloud/updater
+ printf 'chmod Files and Directories\n'
chmod Files and Directories
+ find /var/www/nextcloud/ -type f -print0
+ xargs -0 chmod 0640
+ find /var/www/nextcloud/ -type d -print0
+ xargs -0 chmod 0750
+ printf 'chown Directories\n'
chown Directories
+ chown -R www-data:www-data /var/www/nextcloud/
+ chown -R www-data:www-data /var/www/nextcloud/apps/
+ chown -R www-data:www-data /var/www/nextcloud/config/
+ chown -R www-data:www-data /var/www/nextcloud/data/
+ chown -R www-data:www-data /var/www/nextcloud/themes/
+ chown -R www-data:www-data /var/www/nextcloud/updater/
+ chmod +x /var/www/nextcloud/occ
+ printf 'chmod/chown .htaccess\n'
chmod/chown .htaccess
+ '[' -f /var/www/nextcloud/.htaccess ']'
+ chmod 0644 /var/www/nextcloud/.htaccess
+ chown www-data:www-data /var/www/nextcloud/.htaccess
+ '[' -f /var/www/nextcloud/data/.htaccess ']'
++ '[' -f /usr/local/bin/ncp/CONFIG/nc-datadir.sh ']'
++ source /usr/local/bin/ncp/CONFIG/nc-datadir.sh
++ tmpl_opcache_dir
+++ get_nc_config_value datadirectory
+++ sudo -u www-data php -r 'include("/var/www/nextcloud/config/config.php"); echo($CONFIG["datadirectory"]);'
PHP Warning: Undefined variable $CONFIG in Command line code on line 1
PHP Warning: Trying to access array offset on value of type null in Command line code on line 1
++ DATADIR=
++ echo -n /.opcache
+ local OPCACHEDIR=/.opcache
+ [[ -z /.opcache ]]
+ mkdir -p /.opcache
+ chown -R www-data:www-data /.opcache
+ install_template php/opcache.ini.sh /etc/php/8.1/mods-available/opcache.ini
+ local template=php/opcache.ini.sh
+ local target=/etc/php/8.1/mods-available/opcache.ini
++ mktemp
+ local bkp=/tmp/tmp.TgdhMNAGAt
+ echo 'Installing template '\''php/opcache.ini.sh'\''...'
Installing template 'php/opcache.ini.sh'...
++ dirname /etc/php/8.1/mods-available/opcache.ini
+ mkdir -p /etc/php/8.1/mods-available
+ [[ -f /etc/php/8.1/mods-available/opcache.ini ]]
+ cp -a /etc/php/8.1/mods-available/opcache.ini /tmp/tmp.TgdhMNAGAt
+ [[ '' == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/php/opcache.ini.sh
PHP Warning: Undefined variable $CONFIG in Command line code on line 1
PHP Warning: Trying to access array offset on value of type null in Command line code on line 1
+ rm /tmp/tmp.TgdhMNAGAt
+ [[ -f /run/mysqld/mysqld.pid ]]
+ :
+ [[ -S /var/run/mysqld/mysqld.sock ]]
+ break
+ echo 'Setting up database...'
Setting up database...
++ grep password /root/.my.cnf
++ sed 's|password=||'
+ local DBPASSWD=default
+ mysql
+ echo 'Setting up Apache...'
Setting up Apache...
+ install_template nextcloud.conf.sh /etc/apache2/sites-available/nextcloud.conf --allow-fallback
+ local template=nextcloud.conf.sh
+ local target=/etc/apache2/sites-available/nextcloud.conf
++ mktemp
+ local bkp=/tmp/tmp.30AwLUV9ad
+ echo 'Installing template '\''nextcloud.conf.sh'\''...'
Installing template 'nextcloud.conf.sh'...
++ dirname /etc/apache2/sites-available/nextcloud.conf
+ mkdir -p /etc/apache2/sites-available
+ [[ -f /etc/apache2/sites-available/nextcloud.conf ]]
+ cp -a /etc/apache2/sites-available/nextcloud.conf /tmp/tmp.30AwLUV9ad
+ [[ --allow-fallback == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/nextcloud.conf.sh
INFO: Metrics enabled: no
+ rm /tmp/tmp.30AwLUV9ad
+ a2ensite nextcloud
Enabling site nextcloud.
To activate the new configuration, you need to run:
systemctl reload apache2
+ cat
+ a2enmod proxy proxy_http proxy_wstunnel
Module proxy already enabled
Considering dependency proxy for proxy_http:
Module proxy already enabled
Module proxy_http already enabled
Considering dependency proxy for proxy_wstunnel:
Module proxy already enabled
Module proxy_wstunnel already enabled
++ uname -m
+ arch=aarch64
+ [[ aarch64 =~ armv7 ]]
+ install_template systemd/notify_push.service.sh /etc/systemd/system/notify_push.service
+ local template=systemd/notify_push.service.sh
+ local target=/etc/systemd/system/notify_push.service
++ mktemp
+ local bkp=/tmp/tmp.G6TVgWJAfm
+ echo 'Installing template '\''systemd/notify_push.service.sh'\''...'
Installing template 'systemd/notify_push.service.sh'...
++ dirname /etc/systemd/system/notify_push.service
+ mkdir -p /etc/systemd/system
+ [[ -f /etc/systemd/system/notify_push.service ]]
+ cp -a /etc/systemd/system/notify_push.service /tmp/tmp.G6TVgWJAfm
+ [[ '' == \-\-\d\e\f\a\u\l\t\s ]]
+ bash /usr/local/etc/ncp-templates/systemd/notify_push.service.sh
+ rm /tmp/tmp.G6TVgWJAfm
+ [[ -f /.docker-image ]]
+ systemctl enable notify_push
+ sed -i 's|^ServerSignature .*|ServerSignature Off|' /etc/apache2/conf-enabled/security.conf
+ sed -i 's|^ServerTokens .*|ServerTokens Prod|' /etc/apache2/conf-enabled/security.conf
+ echo 'Setting up system...'
Setting up system...
+ cat
+ echo '*/5 * * * * php -f /var/www/nextcloud/cron.php'
+ crontab -u www-data /tmp/crontab_http
+ rm /tmp/crontab_http
+ [[ '' != '' ]]
+ echo 'Don'\''t forget to run nc-init'
Don't forget to run nc-init
+ local ret=0
+ echo ''
+ [[ -f /usr/local/etc/ncp-config.d/nc-nextcloud.cfg ]]
+ clear_password_fields /usr/local/etc/ncp-config.d/nc-nextcloud.cfg
+ local cfg_file=/usr/local/etc/ncp-config.d/nc-nextcloud.cfg
++ cat /usr/local/etc/ncp-config.d/nc-nextcloud.cfg
+ local 'cfg={
"id": "nc-nextcloud",
"name": "Nc-nextcloud",
"title": "nc-nextcloud",
"description": "Install any NextCloud version",
"info": "WARNING: this will completely wipe out your current instance",
"infotitle": "",
"params": [
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
},
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "768M",
"suggest": "768M"
},
{
"id": "MAXTRANSFERTIME",
"name": "Maximum transfer time",
"value": "3600",
"suggest": "3600"
}
]
}'
++ jq '.params | length'
+ local len=4
+ (( i = 0 ))
+ (( i < len ))
++ jq -r '.params[0].type'
+ local type=null
++ jq -r '.params[0].value'
+ local val=26.0.1
+ [[ null == \p\a\s\s\w\o\r\d ]]
++ jq -r '.params[0].value="26.0.1"'
+ cfg='{
"id": "nc-nextcloud",
"name": "Nc-nextcloud",
"title": "nc-nextcloud",
"description": "Install any NextCloud version",
"info": "WARNING: this will completely wipe out your current instance",
"infotitle": "",
"params": [
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
},
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "768M",
"suggest": "768M"
},
{
"id": "MAXTRANSFERTIME",
"name": "Maximum transfer time",
"value": "3600",
"suggest": "3600"
}
]
}'
+ (( i++ ))
+ (( i < len ))
++ jq -r '.params[1].type'
+ local type=null
++ jq -r '.params[1].value'
+ local val=10G
+ [[ null == \p\a\s\s\w\o\r\d ]]
++ jq -r '.params[1].value="10G"'
+ cfg='{
"id": "nc-nextcloud",
"name": "Nc-nextcloud",
"title": "nc-nextcloud",
"description": "Install any NextCloud version",
"info": "WARNING: this will completely wipe out your current instance",
"infotitle": "",
"params": [
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
},
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "768M",
"suggest": "768M"
},
{
"id": "MAXTRANSFERTIME",
"name": "Maximum transfer time",
"value": "3600",
"suggest": "3600"
}
]
}'
+ (( i++ ))
+ (( i < len ))
++ jq -r '.params[2].type'
+ local type=null
++ jq -r '.params[2].value'
+ local val=768M
+ [[ null == \p\a\s\s\w\o\r\d ]]
++ jq -r '.params[2].value="768M"'
+ cfg='{
"id": "nc-nextcloud",
"name": "Nc-nextcloud",
"title": "nc-nextcloud",
"description": "Install any NextCloud version",
"info": "WARNING: this will completely wipe out your current instance",
"infotitle": "",
"params": [
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
},
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "768M",
"suggest": "768M"
},
{
"id": "MAXTRANSFERTIME",
"name": "Maximum transfer time",
"value": "3600",
"suggest": "3600"
}
]
}'
+ (( i++ ))
+ (( i < len ))
++ jq -r '.params[3].type'
+ local type=null
++ jq -r '.params[3].value'
+ local val=3600
+ [[ null == \p\a\s\s\w\o\r\d ]]
++ jq -r '.params[3].value="3600"'
+ cfg='{
"id": "nc-nextcloud",
"name": "Nc-nextcloud",
"title": "nc-nextcloud",
"description": "Install any NextCloud version",
"info": "WARNING: this will completely wipe out your current instance",
"infotitle": "",
"params": [
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
},
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "768M",
"suggest": "768M"
},
{
"id": "MAXTRANSFERTIME",
"name": "Maximum transfer time",
"value": "3600",
"suggest": "3600"
}
]
}'
+ (( i++ ))
+ (( i < len ))
+ echo '{
"id": "nc-nextcloud",
"name": "Nc-nextcloud",
"title": "nc-nextcloud",
"description": "Install any NextCloud version",
"info": "WARNING: this will completely wipe out your current instance",
"infotitle": "",
"params": [
{
"id": "VER",
"name": "Version",
"value": "26.0.1"
},
{
"id": "MAXFILESIZE",
"name": "Maximum file size",
"value": "10G",
"suggest": "10G"
},
{
"id": "MEMORYLIMIT",
"name": "Memory limit",
"value": "768M",
"suggest": "768M"
},
{
"id": "MAXTRANSFERTIME",
"name": "Maximum transfer time",
"value": "3600",
"suggest": "3600"
}
]
}'
+ return 0
+ rm /usr/local/etc/ncp-config.d/nc-nextcloud.cfg
+ systemctl restart mysqld
+ install_app ncp.sh
+ local ncp_app=ncp.sh
+ [[ -f ncp.sh ]]
+ local script=ncp.sh
++ basename ncp.sh .sh
+ local ncp_app=ncp
+ unset install
+ source ncp.sh
++ WEBADMIN=ncp
++ WEBPASSWD=ownyourbits
++ BRANCH=master
++ BINDIR=/usr/local/bin/ncp
++ CONFDIR=/usr/local/etc/ncp-config.d/
++ APTINSTALL='apt-get install -y --no-install-recommends'
++ export DEBIAN_FRONTEND=noninteractive
++ DEBIAN_FRONTEND=noninteractive
+ echo 'Installing ncp'
Installing ncp
+ install
+ apt-get update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://deb.debian.org/debian bullseye-backports InRelease
Hit:4 http://security.debian.org bullseye-security InRelease
Hit:5 https://packages.sury.org/php bullseye InRelease
Hit:6 http://xogium.performanceservers.nl/apt bullseye InRelease
Reading package lists...
+ apt-get install -y --no-install-recommends git dialog whiptail jq file lsb-release
Reading package lists...
Building dependency tree...
Reading state information...
dialog is already the newest version (1.3-20201126-1).
file is already the newest version (1:5.39-3).
git is already the newest version (1:2.30.2-1+deb11u2).
jq is already the newest version (1.6-2.1).
lsb-release is already the newest version (11.1.0).
whiptail is already the newest version (0.52.21-4+b3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ mkdir -p /usr/local/etc/ncp-config.d/ /usr/local/bin/ncp
+ test -f /usr/bin/raspi-config
+ cat
+ chmod +x /usr/local/bin/ncc
+ cat
+ cat
+ apt-get install -y --no-install-recommends libapache2-mod-authnz-external pwauth
Reading package lists...
Building dependency tree...
Reading state information...
libapache2-mod-authnz-external is already the newest version (3.3.2-0.1+b3).
pwauth is already the newest version (2.3.11-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ a2enmod authnz_external authn_core auth_basic
Module authnz_external already enabled
Module authn_core already enabled
Considering dependency authn_core for auth_basic:
Module authn_core already enabled
Module auth_basic already enabled
+ a2dissite nextcloud
Site nextcloud disabled.
To activate the new configuration, you need to run:
systemctl reload apache2
+ a2ensite ncp-activation
Site ncp-activation already enabled
+ id -u ncp
+ echo -e 'ownyourbits\nownyourbits'
+ passwd ncp
New password: Retype new password: passwd: password updated successfully
+ is_docker
+ [[ -f /.dockerenv ]]
+ [[ -f /.docker-image ]]
+ [[ '' == 1 ]]
+ is_lxc
+ grep -q container=lxc /proc/1/environ
+ chsh -s /usr/sbin/nologin ncp
Password:
chsh: PAM: Authentication failure
+ rm -rf /tmp/nextcloudpi.fE33oo