Difference between revisions of "Systemd"

From Wasya Wiki
Jump to: navigation, search
(Created page with " journalctl -u nginx.service example: <pre> [Unit] Description=watch stocks [Service] Type=forking WorkingDirectory=/home/ubuntu/projects/microsites3a/current ExecStart=/h...")
(No difference)

Revision as of 01:59, 18 January 2020

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