Skip to content

Instantly share code, notes, and snippets.

@jackzampolin
Created May 1, 2018 20:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackzampolin/11f7b01e99819b080f808a02bb68728b to your computer and use it in GitHub Desktop.
Save jackzampolin/11f7b01e99819b080f808a02bb68728b to your computer and use it in GitHub Desktop.
[Unit]
Description=gaiad
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/go/bin/gaiad start
Restart=on-failure
[Install]
WantedBy=multi-user.target
# First take the gaiad.system file above and paste the contents into the below file
nano /etc/systemd/system/gaiad.system

# Then reload systemd
sudo systemctl daemon-reload

# Now you cand use the systemd suite to administer gaiad
sudo systemctl start|stop|restart
journalctl -u gaiad -f 
@andynog
Copy link

andynog commented Mar 1, 2021

thanks, this was helpful. Only thing is that the filename needed to be /etc/systemd/system/gaiad.service instead of .system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment