23.0.2, enable-previews script fixed

This commit is contained in:
Jarno Rankinen 2022-07-31 23:37:26 +03:00
parent 658b9d33ce
commit 342ae55c34
2 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
FROM docker.io/library/nextcloud:23.0.1
FROM docker.io/library/nextcloud:23.0.2
RUN apt-get update &&\
apt-get install -y \

13
enable-previews Normal file → Executable file
View File

@ -1,7 +1,10 @@
#!/bin/bash
NEXTCLOUD_DATA_DIR="/var/www/html"
sed -i '/^);$/d' "$NEXTCLOUD_DATA_DIR"/config/config.php
cat previews.conf >> "$NEXTCLOUD_DATA_DIR"/config/config.php
if curl -sL localhost/status.php | grep -qF '"installed":true,'; then
NEXTCLOUD_DATA_DIR="/var/www/html"
sed -i '/^);$/d' "$NEXTCLOUD_DATA_DIR"/config/config.php
cat /previews.conf >> "$NEXTCLOUD_DATA_DIR"/config/config.php
echo "Enabled video previews in $NEXTCLOUD_DATA_DIR/config/config.php"
else
echo "Please finish the initial setup and try again"
fi