# Setup the path to include local node
PATH=$PWD/node/bin:$PATH
# Get the directory of the script
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
pushd $SCRIPT_DIR
This adds $PWD/node/bin to the PATH before actually changing into the script's dir, meaning $PWD would evaluate to user's home dir when running the script from the systemd service.
Those two blocks should probably be in the opposite order.
See: issue in Discord
This adds
$PWD/node/binto thePATHbefore actually changing into the script's dir, meaning$PWDwould evaluate to user's home dir when running the script from the systemd service.Those two blocks should probably be in the opposite order.
See: issue in Discord