summaryrefslogtreecommitdiff
path: root/debian/vyos-salt-minion.postinst
blob: a1535eb2ba41659699aef36089cc45b4198ab2cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e
if ! deb-systemd-helper --quiet was-enabled salt-minion.service; then
	# Enables the unit on first installation, creates new
	# symlinks on upgrades if the unit file has changed.
	deb-systemd-helper disable salt-minion.service >/dev/null || true
fi

if [ -x "/etc/init.d/salt-minion" ]; then
	update-rc.d -f salt-minion remove >/dev/null
fi

# Add minion user for salt-minion
if ! grep -q '^minion' /etc/passwd; then
  adduser --quiet --firstuid 100 --disabled-login --ingroup users --gecos "salt minion user" --shell /bin/vbash minion
  adduser --quiet minion quaggavty
  adduser --quiet minion vyattacfg
  adduser --quiet minion sudo
  adduser --quiet minion adm
  adduser --quiet minion dip
  adduser --quiet minion disk
  adduser --quiet minion users
fi