summarylogtreecommitdiffstats
path: root/dgrp-install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dgrp-install.sh')
-rw-r--r--dgrp-install.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/dgrp-install.sh b/dgrp-install.sh
new file mode 100644
index 000000000000..7b2fa441f5c2
--- /dev/null
+++ b/dgrp-install.sh
@@ -0,0 +1,49 @@
+# Automatically generated by dgrp-1.9.35 PKGBUILD from Arch Linux AUR
+# http://aur.archlinux.org/
+
+post_upgrade() {
+ set -u
+ mandb -q
+ /usr/bin/dgrp/config/postinstall # this runs 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 ditty; 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}" ]; then
+ echo "To clean fully you may want to remove your config: ${DGRP_STORE}"
+ fi
+ set +u
+}
+
+post_remove() {
+ set -u
+ mandb -q
+ systemctl daemon-reload
+ echo "RealPort (dgrp) startup scripts removed"
+ set +u
+}