summarylogtreecommitdiffstats
path: root/amule.install
blob: 190e74a2d9b8652ad6fe681c2d1e27733649f158 (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
post_install() {
  post_upgrade
  passwd -l amule &>/dev/null
}

_config_instructions() {
  echo "If you plan to use external client (e.g. amuleGUI or amuleweb) then you need to"
  echo "provide [ExternalConnect] configuration."
  echo "You also need to specify amuleweb password."
  echo "amuleweb can be started as 'systemctl start amuleweb'."
  echo "Please follow https://wiki.archlinux.org/index.php/AMule for more information."
  echo "Visit http://forum.adunanza.net/ if you need support."
  }
 
post_upgrade() {
  # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
  getent group amule >/dev/null || groupadd amule
  getent passwd amule >/dev/null || useradd -c 'aMule Client' -g amule -d '/var/lib/amule' -m -s /bin/false amule

  if [ ! -e /var/lib/amule/.aMule/amule.conf ]; then
    _config_instructions
  fi
}

post_remove() {
  # TOTHINK: delete homedir and user account/group?
  #getent passwd amule >/dev/null && userdel amule
  #getent group amule >/dev/null && groupdel amule
  true
}