summarylogtreecommitdiffstats
path: root/nostromo.install
blob: bb5cfe8ade83dfa750686221cfd2bf0ea6fa98e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
post_install() {
  post_upgrade $1
}

post_upgrade() {
  if ! getent passwd nostromo >/dev/null; then
    useradd --system -c 'nostromo web server user' -g daemon -d /usr/share/nostromo/htdocs -s /sbin/nologin nostromo
  fi
  chown -R nostromo:daemon /usr/share/nostromo/htdocs
  chown -R nostromo:daemon /usr/share/nostromo/logs
}

pre_remove() {
  systemctl stop nostromo
}

post_remove() {
  userdel nostromo
}