summarylogtreecommitdiffstats
path: root/g910-gkeys-git.install
blob: 3c83efb8d4895e11746c441d6c709f6907cf1e69 (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
post_install() {
	echo ""
    echo "reloading udev rules"
    udevadm control --reload-rules && udevadm trigger
	echo ""
    echo "Since the service is now running as a user service you need to move your configuration to your user home:"
    echo "mkdir -p "\$HOME"/.config/g910-gkeys/"
    echo "sudo cp /etc/g910-gkeys/config.json "\$HOME"/.config/g910-gkeys/config.json"
    echo "sudo chown "\$USER":users "\$HOME"/.config/g910-gkeys/config.json"
    echo ""
    echo "Then you can enable and run the user service (reload if needed)"
    echo "systemctl --user enable --now g910-gkeys.service"
    echo "systemctl --user start g910-gkeys.service"
    echo ""

    
}


post_upgrade() {
	echo ""
    echo "reloading udev rules"
    udevadm control --reload-rules && udevadm trigger
	echo ""
    echo "Since the service is now running as a user service you need to move your configuration to your user home:"
    echo "mkdir -p "\$HOME"/.config/g910-gkeys/"
    echo "sudo cp /etc/g910-gkeys/config.json "\$HOME"/.config/g910-gkeys/config.json"
    echo "sudo chown "\$USER":users "\$HOME"/.config/g910-gkeys/config.json"
    echo ""
    echo "Then you can enable and run the user service (reload if needed)"
    echo "systemctl --user enable --now g910-gkeys.service"
    echo "systemctl --user start g910-gkeys.service"
    echo ""
}

pre_remove() {
    # shutdown and disable service
    systemctl --user disable --now g910-gkeys
}