summarylogtreecommitdiffstats
path: root/sftpgo-bin.install
blob: 7b07b717ccbce34b42b1b4a8633c570eaede24ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pre_remove() {
  systemctl stop sftpgo.service
  cat <<EOF
==> Leftover files may reside in /var/lib/sftpgo and /etc/sftpgo
==> If you remove them, you may also want to remove user and 
==> group 'sftpgo'
EOF
}

post_upgrade() {
  if (( $(vercmp $2 1.0.0-4) < 0 )); then
    chown -R 315:315 /etc/sftpgo /var/lib/sftpgo
    chmod 750 /etc/sftpgo /var/lib/sftpgo
    chmod 640 /etc/sftpgo/sftpgo.json
    cat <<EOF
==> After this update SFTPGo will run using the dedicated "sftpgo"
==> system user, you will probably need to manually fix the
==> permissions for the SFTPGo virtual users home directory using
==>
==> chown -R sftpgo:sftpgo </path/to/sftpgo/home/dir>
EOF
fi
}