summaryrefslogtreecommitdiff
path: root/templates/etc/s6-services/irc-services/run.epp
blob: ddac6e2830e4d66e533c3705b6ba4f4190c1bff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<%- |
	String $network_name,
	String $run_user,
| -%>
<% if versioncmp( $facts['os']['release']['major'], '10' ) >= 1 { -%>
#!/usr/bin/execlineb -P
<% } else { -%>
#!/usr/local/bin/execlineb -P
<% } -%>

define NETWORK_NAME <%= $network_name %>
define RUN_USER <%= $run_user %>
backtick HOME { homeof ${RUN_USER} }
importas -n -u HOME HOME

fdmove -c 2 1
s6-setuidgid ${RUN_USER}
${HOME}/rundir/anope/current/bin/services --nofork