d2f70ee2a7
Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
544 B
Bash
19 lines
544 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
PKG_SRC="/opt/nextcloud-collabora-nodered"
|
|
PKG_DEST="/data/node_modules/node-red-contrib-nextcloud-collabora"
|
|
|
|
rm -rf "$PKG_DEST"
|
|
cp -a "$PKG_SRC" "$PKG_DEST"
|
|
|
|
if [ ! -f /data/settings.js ] && [ -f "$PKG_SRC/settings.js.example" ]; then
|
|
cp "$PKG_SRC/settings.js.example" /data/settings.js
|
|
fi
|
|
|
|
if [ -f "$PKG_SRC/flows/example-flows.json" ] && [ ! -f /data/flows.json ]; then
|
|
cp "$PKG_SRC/flows/example-flows.json" /data/flows.json
|
|
fi
|
|
|
|
exec npm --prefix /usr/src/node-red start -- --userDir /data --port "${PORT:-1881}"
|