summarylogtreecommitdiffstats
path: root/install
blob: a3a6bf326445f5b922bdf8a901c89ef274575248 (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
pre_upgrade()
{
  systemctl stop cgatepro && (
    touch '/tmp/cgatepro-was-started'
    echo 'Communigaet Pro has been stopped.'
  )
}

post_install()
{
  chgrp mail "$pkgdir"/opt/CommuniGate -R
  chgrp mail "$pkgdir"/var/lib/CommuniGate -R

  cat <<- EOF
   
    ==> Start Communigate Pro using systemd:
    # systemctl start cgatepro
    ==> Auto-start Communigate Pro on boot:
    # systemctl enable cgatepro
    Setup:
    ==> Point your web browser to http://localhost:8010 to configure Communigate Pro.
EOF
}

post_upgrade()
{
  systemctl --system daemon-reload
  if [ -f '/tmp/cgatepro-was-started' ]; then
    rm '/tmp/cgatepro-was-started'
    systemctl start cgatepro
    echo 'Communigate Pro has been started.'
  fi
}