summaryrefslogtreecommitdiff
path: root/extra/hylafax/hylafax.install
blob: 5dacf4045131de7ec2d3bcf1e59d1530ae668f52 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

print_install() {
  printf "\n"
  echo "Add the following to /etc/inittab and run telinit q"
  echo "  f1:2345:respawn:/usr/lib/fax/faxgetty ttyS0"
  echo "faxgetty should now be running"
  printf "\n"
  echo "Run faxsetup to configure and be sure to set..."
  echo "  The device to configure is usually ttyS0"
  echo "  The number of pages to accept to more than 25"
  echo "  The country code and area code"
  echo "  The faxclass to 2.0"
  echo "  Most other defaults are OK"
  printf "\n"
}

print_remove() {
  printf "\n\n"
  echo "You may manually remove /var/spool/hylafax and /usr/lib/fax if you do not need anything."
  echo "You may also remove any aliases added to /etc/mail/aliases."
  printf "\n"
}

post_install() {
  post_upgrade
  print_install
}

post_upgrade() {
  groupadd -g 14 uucp &>/dev/null
  useradd -u 10 -g uucp -d '/' -s /bin/false uucp &>/dev/null
  useradd -u 69 -g daemon -d '/' -s /bin/false fax &>/dev/null
  chown uucp /var/spool/hylafax/{,archive,bin,client,config,dev,docq,doneq,etc}
  chown uucp /var/spool/hylafax/{FIFO,info,log,pollq,recvq,sendq,status,tmp}
  chown uucp /var/spool/hylafax/etc/{hosts.hfaxd,lutRS18.pcf,xferfaxlog}
  chown -R uucp /var/spool/hylafax/etc/templates
  usermod -d '/' uucp &>/dev/null
  usermod -d '/' fax &>/dev/null
}

pre_remove() {
  userdel uucp &>/dev/null
  groupdel uucp &>/dev/null
  userdel fax &>/dev/null
  print_remove
}