diff --git a/conf/rocketchat.service b/conf/rocketchat.service index c1783b0..7afc22b 100644 --- a/conf/rocketchat.service +++ b/conf/rocketchat.service @@ -6,7 +6,7 @@ After=network.target Type=simple WorkingDirectory=#DESTDIR# User=#USER# -ExecStart=node main.js +ExecStart=#NODE# main.js Restart=always SyslogIdentifier=rocketchat Environment="BIND_IP=127.0.0.1" diff --git a/scripts/install b/scripts/install index 420d5a7..c24bd10 100644 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,9 @@ sed -i "s@#PORT#@$port@g" ../conf/rocketchat.service sed -i "s@#USER#@$serviceuser@g" ../conf/rocketchat.service sed -i "s@#DESTDIR#@$final_path@g" ../conf/rocketchat.service sed -i "s@#DBNAME#@$dbname@g" ../conf/rocketchat.service +# absolute node path needed +NODE_BIN=$(which node) +sed -i "s@#NODE#@$NODE_BIN@g" ../conf/rocketchat.service sudo cp ../conf/rocketchat.service /etc/systemd/system/$app.service sudo systemctl daemon-reload