Skip to content

Instantly share code, notes, and snippets.

@edvakf
Last active April 28, 2016 02:23
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 edvakf/d81a4ae1c7211665d7652b6360fa5d2c to your computer and use it in GitHub Desktop.
Save edvakf/d81a4ae1c7211665d7652b6360fa5d2c to your computer and use it in GitHub Desktop.
# sudo vi /etc/systemd/system/rack-test.service
[Unit]
Description=rack-test
After=syslog.target
[Service]
User=admin
Group=admin
WorkingDirectory=/home/admin/rack-test
Environment=PATH=/usr/local/bin:/usr/bin:/bin:/home/admin/local/bin
ExecStart=/home/admin/local/bin/bundle exec unicorn -c unicorn_config.rb
ExecStop=/bin/kill -s QUIT $MAINPID
ExecReload=/bin/kill -s USR2 $MAINPID
[Install]
WantedBy=multi-user.target
@edvakf
Copy link
Author

edvakf commented Apr 27, 2016

起動するには

sudo systemctl start rack-test

起動したか確認するには

sudo systemctl status rack-test

ログを見るには

sudo journalctl -u rack-test -f

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