liuxunorg commented on issue #3313: [ZEPPELIN-4004] add a systemd unit file to 
launch the Zeppelin daemon via systemd commands
URL: https://github.com/apache/zeppelin/pull/3313#issuecomment-466470641
 
 
   1. You need to determine whether the execution user is `root`, Because only 
`root` can copy files to `/etc/systemd/system`.
   ```
   function check_user()
   {
     if [[ $(id -u) -ne 0 ]];then
       echo "This script must be run with a ROOT user!"
       exit
     fi
   }
   ```
   
   2. Need to determine whether the operating system is using `systemd` and 
`systemctl` for service startup (for example, debian 6 does not have 
`systemd`), Because there is no `systemd` and `systemctl`, executing the 
`systemctl` command will fail, so you need to give a prompt information.
   
   3. Combine the `disable_zeppelin_systemd_service.sh` and 
`enable_zeppelin_systemd_service.sh` files into one file (for example, 
zeppelin_systemd_service.sh), `disable` and `enable` by executing parameters, 
Would it be better?
   
   Because not all operating systems use `systemd` for self-starting services. 
So maybe you can support the operating system with `systemd` installed first? 
   This is just my suggestion, See if other people have any opinions? 
   anyway, Thank you for your contribution! :-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to