Systemd

From Wasya Wiki
Revision as of 01:59, 18 January 2020 by Piousbox (Talk | contribs) (Created page with " journalctl -u nginx.service example: <pre> [Unit] Description=watch stocks [Service] Type=forking WorkingDirectory=/home/ubuntu/projects/microsites3a/current ExecStart=/h...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
journalctl -u nginx.service

example:

[Unit]
Description=watch stocks

[Service]
Type=forking
WorkingDirectory=/home/ubuntu/projects/microsites3a/current
ExecStart=/home/ubuntu/.rbenv/shims/bundle exec rake ish_manager:stockwatcher
ExecStop=/bin/echo nothing
Restart=on-failure
Environment=RAILS_ENV=production
Environment=GMAIL_DOMAIN=gmail.com
Environment=GMAIL_USERNAME=<numeric-email>
Environment=GMAIL_PASSWORD=<password>

[Install]
WantedBy=multi-user.target