summarylogtreecommitdiffstats
path: root/paperless.install
blob: 8bcfea6780e01391ea86527f722e5b0986e78c16 (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
47
48
49
50
51
post_install(){
 cat <<INFO

To complete the installation of this paperless fork, edit /etc/paperless.conf,
then create the database with

    sudo -u paperless paperless-manage migrate

and create a super user with

    sudo -u paperless paperless-manage createsuperuser

Paperless services can be started together with

    sudo systemctl start paperless.target

INFO
}

post_upgrade(){
 # warn the user if the provided hook is not being used
 if [ ! -e "/etc/pacman.d/hooks/paperless.hook" ]; then
  cat <<INFO

To complete the update process of paperless, you should run new migrations with

    sudo -u paperless paperless-manage migrate

This process can be automated by running once

    sudo mkdir -p /etc/pacman.d/hooks/
    sudo ln -s /usr/share/paperless/docs/paperless.hook /etc/pacman.d/hooks/

INFO
 fi

 if [ "$(vercmp "$2" "2.15.0")" -lt 0 ] && [ "$(vercmp "$1" "2.15.0")" -ge 0 ]; then
  cat <<INFO

Upgrading paperless-ngx from 2.14.x to 2.15.x requires migration of your webserver settings in /etc/paperless.conf:

    GUNICORN_CMD_ARGS='--bind=127.0.0.1:8000'

becomes:

    PAPERLESS_BIND_ADDR=127.0.0.1
    PAPERLESS_PORT=8000

INFO
 fi
}