update the nifi home in the init.d script if different than /opt/nifi
@@ -81,6 +81,10 @@ chown $NIFI_USER:$NIFI_GROUP /var/log/nifi
echo "Install the nifi service"
cp $NIFI_SETUP_DIR/nifi /etc/init.d
+echo "Updating the home folder for the init.d script"
+sed -i "s|dir=\"\/opt\/nifi\/current\/bin\"|dir=\"$NIFI_INSTALL_HOME\/current\/bin\"|" /etc/init.d/nifi
+
+
if [ "$linux_type" == "chkonfig" ]; then
chkconfig nifi on
elif [ "$linux_type" == "update-rc.d" ]; then
