Skip to content

Commit 6d91190

Browse files
committed
add debug output
1 parent 52ee878 commit 6d91190

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build-lxd.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ jobs:
161161
run: |
162162
export CI
163163
LXD_EXTRA_PROFILE="$LXD_EXTRA_PROFILE" BRANCH="${VERSION##refs/heads/}" ./build/build-LXD.sh
164+
sudo "${LXC}" exec ncp -- bash -c 'echo "=== INSTALLATION COMPLETE ===" >> /var/log/ncp.log'
164165
- name: Pack LXD image
165166
id: pack-lxd
166167
run: |
@@ -275,7 +276,7 @@ jobs:
275276
tail -n 20 geckodriver.log >&2 || true
276277
echo "================"
277278
echo "ncp.log: "
278-
sudo "$LXC" exec ncp -- bash -c "tail -n20 /var/log/ncp.log" || true
279+
sudo "$LXC" exec ncp -- bash -c "tail -n250 /var/log/ncp.log" || true
279280
echo "================"
280281
echo "nextcloud log: "
281282
datadir="$("$LXC" exec ncp -- ncc config:system:get datadirectory)"

bin/nextcloud-domain.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
source /usr/local/etc/library.sh
4-
4+
set -x
55
# wait until user decrypts the instance first
66
while :; do
77
needs_decrypt || break
@@ -31,6 +31,8 @@ while :; do
3131
sleep 3
3232
continue
3333
}
34+
# TODO: REmove debug output
35+
echo "found domain: $nc_domain"
3436
# Fix the situation where junk was introduced in the config by mistake
3537
# because Redis was not yet ready to be used even if it was up
3638
[[ "${nc_domain}" =~ "RedisException" ]] && nc_domain="$(hostname)"

etc/library.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ function set-nc-domain()
146146
fi
147147
if [[ "${domain}" == "" ]] || is_an_ip "${domain}"; then
148148
echo "warning: No domain found. Defaulting to '$(hostname)'"
149+
echo "overwrite.cli.url was: $(ncc config:system:get overwrite.cli.url)"
149150
domain="$(hostname)"
150151
fi
151152
local proto

ncp-web/ncp-launcher.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ function bash_escape_arg($arg): string
166166
echo '{ "token": "' . getCSRFToken() . '",'; // Get new token
167167
exec("/usr/bin/php /var/www/nextcloud/occ config:system:set overwrite.cli.url --value " . bash_escape_arg($_POST['url']),
168168
$out, $ret);
169+
exec("/usr/bin/bash -c 'echo \"url set to: ". bash_escape_arg($_POST['url']) ."\" >> /var/log/ncp.log'");
170+
exec("/usr/bin/bash -c 'echo \"". htmlspecialchars(join("\n", $out), ENT_QUOTES, "UTF-8") ."\" >> /var/log/ncp.log'");
169171
echo ' "out": "' . htmlspecialchars(join("\n", $out), ENT_QUOTES, "UTF-8") . '", ';
170172
echo ' "ret": "' . $ret . '"}';
171173
}

0 commit comments

Comments
 (0)