summarylogtreecommitdiffstats
path: root/clockwork-orange.install
blob: 992456e942e8af68e65b8719b405d9c48215dee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
post_install() {
	gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
	update-desktop-database -q
}

post_upgrade() {
	post_install
}

pre_remove() {
	# pacman hooks run as root, so systemctl --user targets root's session.
	# Use --machine to target the actual user who owns the service.
	if [ -n "$SUDO_USER" ]; then
		systemctl --user --machine="$SUDO_USER@" stop clockwork-orange.service 2>/dev/null || true
		systemctl --user --machine="$SUDO_USER@" disable clockwork-orange.service 2>/dev/null || true
	fi
	echo ":: If clockwork-orange is still running: systemctl --user stop clockwork-orange"
}

post_remove() {
	gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
	update-desktop-database -q
}