summarylogtreecommitdiffstats
path: root/peerbanhelper.install
blob: 532eda22d4448784cf22a8f0b1fda4d7eb4ef199 (plain)
1
2
3
4
5
6
7
8
9
10
post_install() {
  USER=peerbanhelper
  if ! id -u $USER > /dev/null 2>&1; then
    useradd --system --shell '/usr/bin/nologin' --create-home --home-dir "/var/lib/$USER" $USER
  fi
  mkdir -p "/var/lib/$USER/config"
  chown --recursive $USER:$USER '/etc/peerbanhelper' $_
  ln -sf '/etc/peerbanhelper/config.yml' "/var/lib/$USER/config/config.yml"
  ln -sf '/etc/peerbanhelper/profile.yml' "/var/lib/$USER/config/profile.yml"
}