Skip to content

Commit

Permalink
build-sd-images.yml: Adjust php fpm fix to correct php version
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Knöppler <[email protected]>
  • Loading branch information
theCalcaholic committed Aug 24, 2024
1 parent ef84957 commit 75bffeb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build-sd-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ jobs:
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
echo 'PrivateUsers=false' | sudo tee -a raspbian_root/etc/systemd/system/redis-server.service.d/ncp.conf
sudo mkdir -p raspbian_root/etc/systemd/system/php8.2-fpm.service.d
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/php8.2-fpm.service.d/ncp.conf
echo 'ExecStartPre=mkdir -p /var/run/php' | sudo tee -a raspbian_root/etc/systemd/system/php8.2-fpm.service.d/ncp.conf
sudo mkdir -p raspbian_root/etc/systemd/system/php8.3-fpm.service.d
echo '[Service]' | sudo tee raspbian_root/etc/systemd/system/php8.3-fpm.service.d/ncp.conf
echo 'ExecStartPre=mkdir -p /var/run/php' | sudo tee -a raspbian_root/etc/systemd/system/php8.3-fpm.service.d/ncp.conf
- name: Test image
id: test
run: |
Expand Down Expand Up @@ -310,6 +310,14 @@ jobs:
python tests/nextcloud_tests.py --no-gui "$ip" 443 4443 |& awk "{ print \"${LOG_TEST} \" \$0 }"
[[ ${PIPESTATUS[0]} -eq 0 ]] || {
echo -e "${LOG_CICD} Nextcloud test failed!"
echo -e "${LOG_DIAG} /etc/os-release:"
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /etc/os-release'
echo -e "${LOG_DIAG} /usr/local/etc/ncp.cfg:"
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /usr/local/etc/ncp.cfg'
cat ./raspbian_root/usr/local/etc/ncp.cfg
echo -e "${LOG_DIAG} /home/ncp-app-bridge config ncp"
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'sudo -u www-data sudo /home/www/ncp-app-bridge.sh config ncp'
sudo ls -l ./raspbian_root/home/www/ncp-app-bridge.sh
echo -e "{$LOG_DIAG} Geckodriver logs:"
tail -n 20 geckodriver.log >&2 |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
echo -e "${LOG_CICD} ================"
Expand All @@ -319,6 +327,7 @@ jobs:
echo "${LOG_DIAG} Nextcloud log: "
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'ls -l /opt/ncdata/data/nextcloud.log' |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
"${CONTAINER_CMD[@]}" -q ncp /bin/bash -c 'cat /opt/ncdata/data/nextcloud.log' |& awk "{ print \"${LOG_DIAG} \" \$0 }" || true
cat ./raspbian_root/opt/ncdata/data/nextcloud.log |& awk "{ print \"${LOG_DIAG} \" \$0 }"
sleep 12
continue
}
Expand Down
2 changes: 2 additions & 0 deletions build/armbian/armbian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ LINUXFAMILY=$2
BOARD=$3
BUILD_DESKTOP=$4

echo "include home dir? ${INCLUDE_HOME_DIR:-no}"

cd /tmp/overlay
NCPCFG=etc/ncp.cfg
source etc/library.sh # sets RELEASE
Expand Down
3 changes: 2 additions & 1 deletion ncp-app/lib/Service/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function getConfig(string $name, array $defaults): array
}
if ($config == null) {
$this->logger->error("Failed to retrieve ncp config (exit code: $ret)");
$this->logger->error("ERR: $stderr")
return $defaults;
}
return $config;
Expand Down Expand Up @@ -132,7 +133,7 @@ private function runCommand(string $cmd): array {
2 => ["pipe", "w"]
];

$proc = proc_open($cmd, $descriptorSpec, $pipes, "/var/www", null);
$proc = proc_open($cmd, $descriptorSpec, $pipes, "/home/www", null);
$stdout = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$stderr = stream_get_contents($pipes[2]);
Expand Down
2 changes: 1 addition & 1 deletion ncp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ EOF

cat > /home/www/ncp-app-bridge.sh <<'EOF'
#!/bin/bash
set -e
set -ex
grep -q '[\\&#;`|*?~<>^()[{}$&]' <<< "$*" && exit 1
action="${1?}"
[[ "$action" == "config" ]] && {
Expand Down

0 comments on commit 75bffeb

Please sign in to comment.