n8n/docker/images/n8n-custom/docker-entrypoint.sh
2020-05-27 13:57:39 +02:00

24 lines
408 B
Bash
Executable file

#!/bin/sh
if [ -d /root/.n8n ] ; then
chmod o+rx /root
chown -R node /root/.n8n
ln -s /root/.n8n /home/node/
fi
if [ "$#" -gt 0 ]; then
# Got started with arguments
COMMAND=$1;
if [[ "$COMMAND" == "n8n" ]]; then
shift
exec su-exec node ./packages/cli/bin/n8n "$@"
else
exec su-exec node "$@"
fi
else
# Got started without arguments
exec su-exec node ./packages/cli/bin/n8n
fi