summarylogtreecommitdiffstats
path: root/eruption.install
blob: 488569b88283f1743ac3f7700f6e8520def13570 (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
post_install() {
    setcap cap_net_admin+ep /usr/bin/eruption-process-monitor

    systemctl daemon-reload
    systemctl --global daemon-reload
    # systemctl --user daemon-reload

    systemctl preset eruption
    systemctl preset eruption-audio-proxy
    systemctl preset eruption-process-monitor

    systemctl enable --now eruption.service
    systemctl --global enable --now eruption-audio-proxy.service
    # systemctl --global enable --now eruption-process-monitor.service

    systemctl reload dbus.service
    udevadm control --reload-rules
}

post_upgrade() {
    setcap cap_net_admin+ep /usr/bin/eruption-process-monitor

    systemctl daemon-reload
    systemctl --global daemon-reload
    # systemctl --user daemon-reload

    systemctl try-restart eruption.service
    systemctl --global try-restart eruption-audio-proxy.service
    systemctl --global try-restart eruption-process-monitor.service

    systemctl reload dbus.service
    udevadm control --reload-rules
}

pre_remove() {
    systemctl --global stop eruption-process-monitor.service
    systemctl --global stop eruption-audio-proxy.service
    systemctl stop eruption.service
}

post_remove() {
    udevadm control --reload-rules
    systemctl daemon-reload
}