Skip to content

Commit b84e2d8

Browse files
committed
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>
1 parent 641685f commit b84e2d8

File tree

10 files changed

+21
-18
lines changed

10 files changed

+21
-18
lines changed

.github/workflows/build-lxd.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
determine-runner:
3232
env:
3333
LXD_ARCH: "${{ inputs.arch || 'x86' }}"
34-
runs-on: ubuntu-20.04
34+
runs-on: [ubuntu-20.04, X64]
3535
outputs:
3636
runner_label: ${{ steps.script.outputs.runner_label }}
3737
steps:
@@ -86,7 +86,7 @@ jobs:
8686
if-no-files-found: error
8787

8888
build-previous:
89-
runs-on: ubuntu-20.04
89+
runs-on: [ubuntu-20.04, X64]
9090
if: ${{ inputs.arch == 'x86' || inputs.arch == '' }}
9191
outputs:
9292
artifact_name: "${{ env.ARTIFACT_NAME }}"
@@ -135,7 +135,7 @@ jobs:
135135
lxd_version: latest/stable
136136
- name: Fix LXD
137137
run: |
138-
lxc profile create network
138+
lxc profile list -f csv | grep 'network' || lxc profile create network
139139
cat <<EOF | lxc profile edit network
140140
devices:
141141
eth0:
@@ -175,7 +175,7 @@ jobs:
175175
test-update:
176176
needs:
177177
- build-previous
178-
runs-on: ubuntu-20.04
178+
runs-on: [ubuntu-20.04, X64]
179179
outputs:
180180
artifact_name: "${{ env.ARTIFACT_NAME }}"
181181
artifact_file: "${{ steps.pack-lxd.outputs.artifact_file }}"
@@ -387,7 +387,7 @@ jobs:
387387
convert-to-lxc-image:
388388
needs:
389389
- build-current
390-
runs-on: ubuntu-20.04
390+
runs-on: [ubuntu-20.04, X64]
391391
outputs:
392392
artifact_name: "${{ steps.lxd-to-lxc.outputs.artifact_name }}"
393393
artifact_file: "${{ steps.lxd-to-lxc.outputs.artifact_file }}"

.github/workflows/build-sd-images.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323

2424
jobs:
2525
build:
26-
runs-on: ubuntu-20.04
26+
runs-on: [ubuntu-20.04, X64]
2727
env:
2828
VERSION: "${{ inputs.git_ref }}"
2929
LOG_GUEST: "\\033[1;34mGUEST::\\033[0m"
@@ -130,7 +130,7 @@ jobs:
130130

131131
test:
132132
needs: build
133-
runs-on: ubuntu-20.04
133+
runs-on: [ubuntu-20.04, X64]
134134
env:
135135
VERSION: "${{ inputs.git_ref }}"
136136
ARTIFACT_ID: ${{ needs.build.outputs.artifact_name }}

bin/ncp-provisioning.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ BKP="$( ls -1t /var/www/nextcloud-bkp_*.tar.gz 2>/dev/null | head -1 )"
6767
## Check for encrypted data and ask for password
6868
if needs_decrypt; then
6969
echo "Detected encrypted instance"
70-
a2dissite ncp nextcloud
70+
a2dissite ncp 001-nextcloud
7171
a2ensite ncp-activation
7272
apache2ctl -k graceful
7373
fi

bin/ncp/CONFIG/nc-nextcloud.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ EOF
194194

195195
## SET APACHE VHOST
196196
echo "Setting up Apache..."
197-
install_template nextcloud.conf.sh /etc/apache2/sites-available/nextcloud.conf --allow-fallback || {
197+
install_template nextcloud.conf.sh /etc/apache2/sites-available/001-nextcloud.conf --allow-fallback || {
198198
echo "ERROR: Parsing template failed. Nextcloud will not work."
199199
exit 1
200200
}
201-
a2ensite nextcloud
201+
a2ensite 001-nextcloud
202202

203203
cat > /etc/apache2/sites-available/000-default.conf <<'EOF'
204204
<VirtualHost _default_:80>

bin/ncp/CONFIG/nc-passwd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ configure()
2727
sudo -u www-data php /var/www/nextcloud/cron.php
2828

2929
a2dissite ncp-activation
30-
a2ensite ncp nextcloud
30+
a2ensite ncp 001-nextcloud
3131
apachectl -k graceful
3232

3333
# Trusted Domain (local/public IP), also configures notify_push

bin/ncp/NETWORKING/letsencrypt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
ncdir=/var/www/nextcloud
12-
nc_vhostcfg=/etc/apache2/sites-available/nextcloud.conf
12+
nc_vhostcfg=/etc/apache2/sites-available/001-nextcloud.conf
1313
ncp_vhostcfg=/etc/apache2/sites-available/ncp.conf
1414
letsencrypt=/usr/bin/letsencrypt
1515

bin/ncp/SECURITY/nc-encrypt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ configure()
6060
echo "${PASSWORD?}" | gocryptfs -allow_other -q "${encdir}" "${datadir}" 2>&1 | sed /^Switch/d
6161

6262
# switch to the regular virtual hosts after we decrypt, so we can access NC and ncp-web
63-
a2ensite ncp nextcloud
63+
a2ensite ncp 001-nextcloud
6464
a2dissite ncp-activation
6565
apache2ctl -k graceful
6666

bin/ncp/SYSTEM/metrics.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ configure() {
196196
if [[ "$ACTIVE" != yes ]]
197197
then
198198

199-
install_template nextcloud.conf.sh /etc/apache2/sites-available/nextcloud.conf || {
200-
install_template nextcloud.conf.sh /etc/apache2/sites-available/nextcloud.conf --allow-fallback
199+
install_template nextcloud.conf.sh /etc/apache2/sites-available/001-nextcloud.conf || {
200+
install_template nextcloud.conf.sh /etc/apache2/sites-available/001-nextcloud.conf --allow-fallback
201201
echo -e "ERROR while generating nextcloud.conf! Exiting..."
202202
return 1
203203
}
@@ -248,8 +248,8 @@ configure() {
248248
echo "done."
249249

250250

251-
install_template nextcloud.conf.sh /etc/apache2/sites-available/nextcloud.conf || {
252-
install_template nextcloud.conf.sh /etc/apache2/sites-available/nextcloud.conf --allow-fallback
251+
install_template nextcloud.conf.sh /etc/apache2/sites-available/001-nextcloud.conf || {
252+
install_template nextcloud.conf.sh /etc/apache2/sites-available/001-nextcloud.conf --allow-fallback
253253
echo -e "ERROR while generating nextcloud.conf! Exiting..."
254254
return 1
255255
}

ncp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ EOF
7474

7575
$APTINSTALL libapache2-mod-authnz-external pwauth
7676
a2enmod authnz_external authn_core auth_basic
77-
a2dissite nextcloud
77+
a2dissite 001-nextcloud
7878
a2ensite ncp-activation
7979

8080
## NCP USER FOR AUTHENTICATION

updates/1.53.1.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set -e
44
source /usr/local/etc/library.sh
55

66
install_template apache2/ncp.conf.sh /etc/apache2/sites-available/ncp.conf --defaults
7+
a2dissite nextcloud
8+
mv /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-available/001-nextcloud.conf
9+
a2ensite 001-nextcloud
710
bash -c "sleep 2 && service apache2 reload" &>/dev/null &

0 commit comments

Comments
 (0)