blob: 31b9c98796cc5f78375fe86e69ab8bc51faa6921 (
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
|
post_install() {
printf "You've successfully installed misskey!\n"
if ! [ -f "/etc/webapps/misskey/default.yml" ]; then
cp "/etc/webapps/misskey/example.yml" "/etc/webapps/misskey/default.yml"
fi
printf "More on the setup: https://wiki.archlinux.org/title/Misskey\n"
}
## $1: new package version
## $2: old package version
pre_upgrade() {
## Ignore reinstallations of the same or older versions
if [ $(vercmp $1 $2) -gt 0 ] ; then
## Shut down the misskey service before touching it's files
if systemctl is-active misskey.service > /dev/null; then
printf "Shutting down misskey\n"
systemctl stop misskey.service
fi
fi
}
post_upgrade() {
## Ignore reinstallations of the same or older versions
if [ $(vercmp $1 $2) -gt 0 ] ; then
/usr/bin/misskey -m
fi
}
|