Difference between revisions of "CentOS 8.x Create systemd service for erlang yaws web server"
From Notes_Wiki
(Created page with "<yambe:breadcrumb self="Create systemd service for erlang yaws web server">CentOS 8.x systemd or systemctl|systemd or systemctl</yambe:breadcrumb> =CentOS 8.x Create systemd s...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x systemd or systemctl|systemd or systemctl]] > [[CentOS 8.x Create systemd service for erlang yaws web server]] | |||
[[Main_Page|Home]] > [[Erlang]] > [[Yaws]] > [[CentOS 8.x Create systemd service for erlang yaws web server]] | |||
Create a Unit file such as: | Create a Unit file such as: | ||
Line 42: | Line 44: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x systemd or systemctl|systemd or systemctl]] > [[CentOS 8.x Create systemd service for erlang yaws web server]] | |||
[[Main_Page|Home]] > [[Erlang]] > [[Yaws]] > [[CentOS 8.x Create systemd service for erlang yaws web server]] |
Latest revision as of 03:41, 19 April 2022
Home > CentOS > CentOS 8.x > System Administration > systemd or systemctl > CentOS 8.x Create systemd service for erlang yaws web server
Home > Erlang > Yaws > CentOS 8.x Create systemd service for erlang yaws web server
Create a Unit file such as:
[Unit] Description=Yaws service for custom application1 After=network.target Wants=network.target [Service] WorkingDirectory=/root/application1/ User=root Group=root Type=forking PIDFile=/var/run/yaws.pid ExecStart=/root/application1/start_yaws.sh #ExecStart=/usr/bin/yaws --id application1 --conf /root/application1/yaws.conf --runmod starter -D --heart ExecReload=/usr/bin/yaws --stop --id application1; /root/application1/start_yaws.sh ExecStop=/usr/bin/yaws --stop --id application1 [Install] WantedBy=multi-user.target
Where /root/application1/start_yaws.sh can have:
#!/bin/bash mkdir -p yaws_logs yaws --id application1 --conf ./yaws.conf --daemon --heart \ --runmod starter sleep 3 ps -C beam -o pid | tail -1 > /var/run/yaws.pid exit 0
Home > CentOS > CentOS 8.x > System Administration > systemd or systemctl > CentOS 8.x Create systemd service for erlang yaws web server
Home > Erlang > Yaws > CentOS 8.x Create systemd service for erlang yaws web server