blob: 5e6d3f4767ee5b63cdc546e306a3777adf68cad5 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Automatically generated by dgrp-1.9.35 PKGBUILD from Arch Linux AUR
# http://aur.archlinux.org/
pre_install() {
set -u
# Ensure that config files don't get lost on reinstall, chiefly from the digi make install to package upgrade
# post_install code will rename it back
if [ -s '/etc/dgrp.backing.store' -a ! -s '/etc/dgrp.backing.store.pacsave' ]; then
mv '/etc/dgrp.backing.store' '/etc/dgrp.backing.store.pacsave'
fi
set +u
}
post_upgrade() {
set -u
mandb -q
/usr/bin/dgrp/config/postinstall # this used to run depmod -a
depmod -a
# rmdir '/tmp/dgrp' # postinstall forgets to remove this. Useful on /tmp folders that are not mounted tmpfs
systemctl daemon-reload
# Digi's postinstall automatically loads the daemons so we might as well too
for _daemon in daemon ditty; do
systemctl enable "dgrp_${_daemon}.service"
systemctl start "dgrp_${_daemon}.service"
done
#echo "RealPort (dgrp) startup scripts updated or installed"
set +u
}
post_install() {
post_upgrade
}
pre_upgrade() {
set -u
for _daemon in daemon; do
systemctl stop "dgrp_${_daemon}.service"
systemctl disable "dgrp_${_daemon}.service"
done
/usr/bin/dgrp/config/preuninstall
set +u
}
pre_remove() {
pre_upgrade
set -u
. '/usr/bin/dgrp/config/file_locations'
if [ -f "${DGRP_STORE}.old" ]; then
echo "To clean fully you may want to remove your config backup: ${DGRP_STORE}.old"
fi
if [ -f "${DGRP_STORE}.pacsave" ]; then
echo "To clean fully you may want to remove your config backup: ${DGRP_STORE}.pacsave"
fi
set +u
}
post_remove() {
set -u
mandb -q
systemctl daemon-reload
#echo "RealPort (dgrp) startup scripts removed"
set +u
}
# Automatically generated by dgrp-1.9.35 PKGBUILD from Arch Linux AUR
|