Skip to content

Commit 4e2c89b

Browse files
committed
Update built-in plugins on container update
1 parent a47eb79 commit 4e2c89b

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
225225

226226
## Versions
227227

228+
* **21.07.23:** - Update built-in plugins on container update.
228229
* **25.05.23:** - Rebase to Alpine 3.18, deprecate armhf.
229230
* **13.04.23:** - Move ssl.conf include to default.conf.
230231
* **28.12.22:** - Rebase to Alpine 3.17, migrate to s6v3.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ app_setup_block: |
3939
Upon first install go to `http://$IP:$PORT/install.php` once you have completed the setup, restart the container, login as admin and set "Use nice URLs" in the `admin/Configuration Settings` panel to `.htaccess` and tick `Use slash as namespace separator in URLs` to enable [nice URLs](https://www.dokuwiki.org/rewrite) you will find the webui at `http://$IP:$PORT/`, for more info see [{{ project_name|capitalize }}]({{ project_url }})
4040
# changelog
4141
changelogs:
42+
- { date: "21.07.23:", desc: "Update built-in plugins on container update." }
4243
- { date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf." }
4344
- { date: "13.04.23:", desc: "Move ssl.conf include to default.conf." }
4445
- { date: "28.12.22:", desc: "Rebase to Alpine 3.17, migrate to s6v3." }

root/etc/s6-overlay/s6-rc.d/init-dokuwiki-config/run

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ fi
3232

3333
## Move user folders to persistent storage
3434
for i in "${USER_DIRECTORY[@]}"; do
35-
if [[ ! -d /config/dokuwiki/${i} ]] && [[ -d /app/www/public/"${i}" ]]; then
35+
if [[ ! -d /config/dokuwiki/"${i}" ]] && [[ -d /app/www/public/"${i}" ]]; then
3636
mv /app/www/public/"${i}" /config/dokuwiki/"${i}"/
3737
fi
3838
done
3939

40+
# Update built-in plugins
41+
for i in /app/www/public/lib/plugins/*/; do
42+
if [[ -d "/config/dokuwiki/lib/plugins/$(basename "${i}")" ]] && [[ -d "/app/www/public/lib/plugins/$(basename "${i}")" ]]; then
43+
cp -R /app/www/public/lib/plugins/"$(basename "${i}")"/* /config/dokuwiki/lib/plugins/"$(basename "${i}")"
44+
fi
45+
done
46+
4047
## Remove user folders
4148
for i in "${USER_DIRECTORY[@]}"; do
4249
if [[ -d /app/www/public/"${i}" ]]; then
@@ -76,12 +83,11 @@ fi
7683
## Remove install.php once setup & enable pretty urls to work after setting .htaccess method in admin panel.
7784
if [[ -f /config/dokuwiki/conf/local.php ]]; then
7885
if rm -rf /app/www/public/install.php; then
79-
echo "Existing install found install.php not available"
86+
echo "Existing install found, deleting install.php."
8087
fi
8188

8289
# when default savedir stil active: change it to the path IN the container
8390
if ! grep -q "^\$conf\[\'savedir\'\]\s*\=" /config/dokuwiki/conf/local.php; then
84-
echo "Set 'savedir' to absolute path in the container"
8591
echo "\$conf['savedir'] = '/app/www/public/data';" >> /config/dokuwiki/conf/local.php
8692
fi
8793

0 commit comments

Comments
 (0)