-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switching from `root` to another user needs a bit more testing, as we need to figure out how to auto-migrate all existing instances of n8n when people upgrade.
- Loading branch information
Showing
2 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
#!/bin/sh | ||
|
||
if [ -d /root/.n8n ] ; then | ||
chmod o+rx /root | ||
chown -R node /root/.n8n | ||
ln -s /root/.n8n /home/node/ | ||
fi | ||
|
||
chown -R node /home/node | ||
|
||
if [ "$#" -gt 0 ]; then | ||
# Got started with arguments | ||
exec node "$@" | ||
exec su-exec node "$@" | ||
else | ||
# Got started without arguments | ||
exec n8n | ||
exec su-exec n8n | ||
fi |