summarylogtreecommitdiffstats
path: root/.INSTALL
blob: d72871ce70cbb67847454f100c3690e22229feca (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
#!/bin/sh

post_install() {
    systemctl daemon-reload
    systemctl enable v2raya
    systemctl start v2raya

    ECHOLEN=$(echo -e|awk '{print length($0)}')
    if [ ${ECHOLEN} = '0' ]
    then
        ECHO='echo -e'
    else
        ECHO='echo'
    fi;
    $ECHO "\033[36m******************************\033[0m"
    $ECHO "\033[36m*         Completed!         *\033[0m"
    $ECHO "\033[36m******************************\033[0m"
}

post_upgrade() {
    systemctl daemon-reload
    systemctl restart v2raya
    
    ECHOLEN=$(echo -e|awk '{print length($0)}')
    if [ ${ECHOLEN} = '0' ]
    then
        ECHO='echo -e'
    else
        ECHO='echo'
    fi;
    $ECHO "\033[36m******************************\033[0m"
    $ECHO "\033[36m*         Completed!         *\033[0m"
    $ECHO "\033[36m******************************\033[0m"
}

pre_remove() {
    systemctl disable v2raya
    systemctl stop v2raya
    systemctl stop v2ray
}

post_remove() {
    systemctl daemon-reload
}