Skip to content

Instantly share code, notes, and snippets.

@ccammilleri
Last active April 16, 2020 00:26
Show Gist options
  • Save ccammilleri/ce5ec22fc83531b697a5e12062d8e194 to your computer and use it in GitHub Desktop.
Save ccammilleri/ce5ec22fc83531b697a5e12062d8e194 to your computer and use it in GitHub Desktop.
A systemd script to run hashview as a service.
[Unit]
Description=hashview
[Service]
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/hashview
ExecStart=/bin/bash -lc 'RACK_ENV=development foreman start'
ExecStop=/bin/bash -lc 'RACK_ENV=development foreman stop'
Restart=always
[Install]
WantedBy=multi-user.target
@ccammilleri
Copy link
Author

Save script to /etc/systemd/system/hashview.service

Then run the following:

sudo systemctl daemon-reload
sudo systemctl start hashview.service
sudo systemctl enable hashview.service

@marginaldeer
Copy link

Thank you so much for getting this up here!

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