summarylogtreecommitdiffstats
path: root/clash-premium-tun.install
blob: 9cd57061e43f2daec83157113c88a131133fd31e (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
post_install() {
    systemctl daemon-reload
    echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
    echo "+  Install successfully                                         +"
    echo "+                                                               +"
    echo "+  Home directory at /etc/clash                                 +"
    echo "+                                                               +"
    echo "+  All dns traffic will be redirected to 198.18.0.2:53          +"
    echo "+  Please use clash core's 'tun.dns-hijack' to handle it        +"
    echo "+                                                               +"
    echo "+  Use 'systemctl start clash' to start                         +"
    echo "+  Use 'systemctl enable clash' to enable auto-restart on boot  +"
    echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
}

post_upgrade() {
    systemctl daemon-reload
    systemctl restart clash
}

pre_remove() {
    systemctl disable --now clash
}

post_remove() {
    systemctl daemon-reload
}