Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Unit]
- Description=app
- [Service]
- # This will allow using `systemd:notify/1` for informing the system supervisor
- # about application status.
- Type=notify
- #Type=simple
- # Application need to start in foreground instead of forking into background,
- # otherwise it may be not correctly detected and system will try to start it
- # again.
- ExecStart=/root/....aa foreground
- # Enable watchdog process, which will expect messages in given timeframe,
- # otherwise it will restart the process as a defunct. It should be managed
- # automatically by `systemd` application in most cases and will send messages
- # twice as often as requested.
- #
- # You can force failure by using `systemd:watchdog(trigger)` or manually ping
- # systemd watchdog via `systemd:watchdog(ping)`.
- WatchdogSec=10s
- Restart=on-failure
- [Install]
- WantedBy=multi-user.target
- /etc/systemd/system/*.service
- sudo systemd-analyze verify NAME.service
- https://www.codercto.com/a/100315.html
- https://github.com/hauleth/erlang-systemd
- https://hexdocs.pm/systemd/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement