File: postinst

package info (click to toggle)
gup 0.5.8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 188 kB
  • ctags: 164
  • sloc: ansic: 1,571; sh: 188; makefile: 58
file content (30 lines) | stat: -rw-r--r-- 742 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh -e

if ! id gup >/dev/null 2>&1; then
  adduser --system --home /var/lib/gup/ --ingroup news \
    --disabled-password --gecos "Group Update Program" gup
fi

if [ ! -d /var/lib/gup/default ]; then
  cd /var/lib/gup/
  echo '| /usr/lib/gup/process' > .forward
  ln -s /etc/gup.conf config
  mkdir default sites
  echo -e 'HOST\\\n  :!*,\\' > default/header
  echo -e '  :Tf,Wfb,B4096/1024:' > default/trailer
  ln -s /etc/news/newsfeeds.header default/global.header
  chown -R gup:news .
fi

if [ ! -f /etc/gup.conf ]; then
  echo -e '#site\tpassword\tuser@example.com' > /etc/gup.conf
  chown gup:news /etc/gup.conf
  chmod 700 /etc/gup.conf
fi

if [ ! -d /var/log/gup ]; then
  install -d --owner=gup /var/log/gup
fi

#DEBHELPER#