This message was deleted.
# general
s
This message was deleted.
j
Without going into the full agent-based deployment, my first thought would be to nohup this, redirect output to a log file, and throw it in the background, e.g.:
Copy code
$ nohup ./bin/start-druid > /tmp/logfile 2>&1 &
I just tried it on my Mac install and it seems to work fine.
a
@John Kowtko Just tried that in AWS EC2 linux machine and when I close the terminal, the service stopped.
s
Thanks for the reply, it does work although I eventually figured out how to create a file for systemd.
Copy code
[Unit]
Description=Druid Daemon
Documentation=<http://druid.io|http://druid.io>
Requires=network.target
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/sgautam/Druid/apache-druid-26.0.0
User=sgautam
Group=sgautam
ExecStart=/home/sgautam/Druid/apache-druid-26.0.0/bin/start-druid

[Install]
WantedBy=default.target
Save this as druid.service in /etc/systemd/system/ and then do,
Copy code
sudo systemctl daemon-reload
sudo systemctl start druid
j
Hmmm ... you are right, the process stayed active when I "logged out", but was killed when I closed the terminal window ... the default shells work a little differently on a Mac than an old Unix box then ...