Current section
Files
Jump to
Current section
Files
templates/init_scripts/systemd.service.eex
[Unit]
Description=<%= description %>
After=network.target
[Service]
Type=simple
User=<%= uid %>
Group=<%= gid %>
<%= if uid == "root" do %>
Environment=HOME=/root
<% else %>
Environment=HOME=/home/<%= uid %>
<% end %>
WorkingDirectory=<%= base_path %>/<%= name %>
ExecStart=<%= base_path %>/<%= name %>/bin/<%= name %> start
ExecStop=<%= base_path %>/<%= name %>/bin/<%= name %> stop
Restart=on-failure
RemainAfterExit=yes
RestartSec=5
SyslogIdentifier=<%= name %>
[Install]
WantedBy=multi-user.target