|
@ -188,4 +188,17 @@ nextcloud:config:simple:add() { |
|
|
fi |
|
|
fi |
|
|
## Add '$key' => 'value', to the end of the file, before the closing paren. |
|
|
## Add '$key' => 'value', to the end of the file, before the closing paren. |
|
|
sed -ri "s/^(\);)$/ '$key' => '${value}',\n\1/g" "$CONFIGFILE" |
|
|
sed -ri "s/^(\);)$/ '$key' => '${value}',\n\1/g" "$CONFIGFILE" |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nextcloud:config:version() { |
|
|
|
|
|
for f in {"$SERVICE_CONFIGSTORE","$SERVICE_DATASTORE"}/var/www/html/config/config.php; do |
|
|
|
|
|
if [ -e "$f" ]; then |
|
|
|
|
|
cat "$f" |
|
|
|
|
|
break |
|
|
|
|
|
fi |
|
|
|
|
|
done | |
|
|
|
|
|
grep "'version' =>" | |
|
|
|
|
|
cut -f 4 -d \' | |
|
|
|
|
|
cut -f 1-3 -d . |
|
|
|
|
|
} |