summarylogtreecommitdiffstats
path: root/frp.install
blob: b4a59af95129f1dbdbb837946efe266e11e49671 (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() {
    echo -e '\tTo switch to the toml configuration, edit the corresponding systemd service file'
    echo -e '\twith "systemctl edit ..." and replace'
    echo -e '\t${CREDENTIALS_DIRECTORY}/config with ${CREDENTIALS_DIRECTORY}/config_toml\n'
}

pre_upgrade() {
    if (( $(vercmp "$2" "0.52.0-1") < 0 )); then
        echo -e '\n\tBreaking changes in version 0.52.0+'
        echo -e '\tBe sure to read the release notes before upgrading'
        echo -e '\tSee https://github.com/fatedier/frp/releases/tag/v0.52.0\n'
    fi

    if (( $(vercmp "$2" "0.52.1-2") < 0 )); then
        echo -e '\t** New configuration file changes: https://github.com/fatedier/frp#configuration-files **\n'
    else
        echo
    fi

    if (( $(vercmp "$2" "0.52.1-5") < 0 )); then
        post_install
    fi
}

post_upgrade() {
    find /etc/frp \( -iname frpc.toml -o -iname frps.toml \) -perm /o+rw -printf 'Note: Permissions for "%p (%M)" are too open!\n'
}