summarylogtreecommitdiffstats
path: root/g810-led-git.install
blob: 7787575c871d6aee274e6fc5223589b67f80db5f (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
## arg 1:  the new package version
pre_install() {
	echo ""
}

## arg 1:  the new package version
post_install() {
	udevadm control --reload-rules
	systemctl daemon-reload
	/usr/bin/g810-led -p /etc/g810-led/profile
	# Don't enable service by default in ArchLinux
	#systemctl enable g810-led-reboot
	echo "You can enable systemd unit g810-led-reboot with the next command :"
	echo "systemctl enable g810-led-reboot"
}

## arg 1:  the new package version
## arg 2:  the old package version
pre_upgrade() {
	echo ""
}

## arg 1:  the new package version
## arg 2:  the old package version
post_upgrade() {
	udevadm control --reload-rules
	systemctl daemon-reload
	echo "This package is a dev version."
	echo "Switch to g810-led package."
}

## arg 1:  the old package version
pre_remove() {
	systemctl stop g810-led-reboot
	systemctl disable g810-led-reboot
	
	# For old release, need to be removed
	systemctl stop g810-led
	systemctl disable g810-led
}

## arg 1:  the old package version
post_remove() {
	systemctl daemon-reload
	udevadm control --reload-rules
}