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

define USER <%= $username %>
backtick HOME { homeof ${USER} }
importas -n -u HOME HOME
define SVDIR ${HOME}/.s6-scandir

fdmove -c 2 1

s6-setuidgid ${USER}
s6-svscan -c 20 ${SVDIR}