Github user jfrazee commented on the issue:

    https://github.com/apache/nifi/pull/1794
  
    @trixpan @apiri Few things. It seems like we should be using lsb_release to 
grab the OS as well as chkconfig to handle creating run level symlinks instead 
of on on our own, at least for most of the OSes. And, while we install an 
init.d script and systemd can run those, we actually don't create a systemd 
unit today, so for many of the latest releases service and systemctl won't 
actually start nifi.
    
    So I guess what I'm saying is that I think there might be 3 issues here: OS 
detection improvement, change how we set run levels, and add systemd unit and 
upstart scripts for OSes that aren't really doing sysv init anymore.
    
    FWIW I've been using something like this for the systemd unit:
    ```
    [Unit]
    Description=Apache NiFi
    After=network.target
    
    [Service]
    Type=forking
    User={{ nifi_run_as }}
    Group={{ nifi_run_as }}
    ExecStart={{ nifi_install_dir }}/bin/nifi.sh start
    ExecStop={{ nifi_install_dir }}/bin/nifi.sh stop
    Restart=on-failure
    RestartSec=60s
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to