summarylogtreecommitdiffstats
path: root/movim.install
blob: 655057c5a7dc8d61dba33784cc7d7ea88c5ffebf (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
pre_upgrade() {
  if [ -d /usr/share/webapps/movim ] && [ ! -L /usr/share/webapps/movim/cache ]; then
    echo 'The "cache" and "users" folders in /usr/share/webapps/movim are'
    echo 'being moved to /var/cache/webapps/movim.'

    install -m755 -d /var/cache/webapps/movim
    mv /usr/share/webapps/movim/{cache,users} /var/cache/webapps/movim/
    chmod -R u+rwX,g+rwX,o-rwx /var/cache/webapps/movim
    chown -R root:http /var/cache/webapps/movim
  fi
}

post_install() {
  echo 'Post-installation tutorial'
  echo 'https://github.com/movim/movim/wiki/Install-Movim#2-database-configuration'
  echo
  echo 'You should also read'
  echo 'https://github.com/movim/movim/wiki/Install-Movim#general-behaviour'
  echo
  echo 'To complete the setup, please install a database and configure a reverse proxy.'
  echo 'Don’t forget to adapt /etc/webapps/movim/db.inc.php and /etc/default/movim'
  echo 'to your server settings'
  echo 'Once everything is setup, use `systemctl start movim` to start the daemon'
}

post_upgrade() {
  # XXX: Waiting for upstream to fix https://github.com/movim/movim/issues/509
  ln -sf /var/cache/webapps/movim/cache /usr/share/webapps/movim
  ln -sf /var/cache/webapps/movim/users /usr/share/webapps/movim

  post_install $1
}