From 0eaa80950ab12d7d569588209d5c0cbc8a8f92f6 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 15 Jun 2017 11:56:37 +0200 Subject: [PATCH] check for file before going sed on it --- rootfs/etc/cont-init.d/00-nextcloud | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/cont-init.d/00-nextcloud b/rootfs/etc/cont-init.d/00-nextcloud index 9037846..d96316e 100644 --- a/rootfs/etc/cont-init.d/00-nextcloud +++ b/rootfs/etc/cont-init.d/00-nextcloud @@ -12,8 +12,9 @@ PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT EXIS if [ $? -ne 1 ]; then cd /var/lib/nextcloud - sed -i -e "s/'installed' => true,/'installed' => false,/g" /var/lib/nextcloud/config/config.php - + if [ ! -f /var/lib/nextcloud/config/config.php ]; then + sed -i -e "s/'installed' => true,/'installed' => false,/g" /var/lib/nextcloud/config/config.php + fi s6-setuidgid nginx ./occ maintenance:install \ --database=pgsql \ --database-host=$DB_HOST \