2020-05-15 00:31:55 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ -d /root/.n8n ] ; then
|
|
|
|
chmod o+rx /root
|
|
|
|
chown -R node /root/.n8n
|
|
|
|
ln -s /root/.n8n /home/node/
|
|
|
|
fi
|
|
|
|
|
2021-11-13 02:06:16 -08:00
|
|
|
chown -R node /home/node
|
|
|
|
|
2020-05-15 00:31:55 -07:00
|
|
|
if [ "$#" -gt 0 ]; then
|
|
|
|
# Got started with arguments
|
2020-05-27 04:57:39 -07:00
|
|
|
COMMAND=$1;
|
|
|
|
|
|
|
|
if [[ "$COMMAND" == "n8n" ]]; then
|
|
|
|
shift
|
|
|
|
exec su-exec node ./packages/cli/bin/n8n "$@"
|
|
|
|
else
|
|
|
|
exec su-exec node "$@"
|
|
|
|
fi
|
|
|
|
|
2020-05-15 00:31:55 -07:00
|
|
|
else
|
2020-05-27 04:57:39 -07:00
|
|
|
# Got started without arguments
|
|
|
|
exec su-exec node ./packages/cli/bin/n8n
|
2020-05-15 00:31:55 -07:00
|
|
|
fi
|