summarylogtreecommitdiffstats
path: root/frp-panel.install
blob: 0a89147858bc3b336c54c9e360ceb33164d49e14 (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
#/usr/bin/env bash

_pkgname="frp-panel"
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"

note() {
    printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
}

post_install() {
    if [[ $LANG == "zh_CN.UTF-8" ]]; then
        note "master 节点的环境变量文件为 '/etc/$_pkgname/master.env' ...
          master 节点的启动命令为 'systemctl enable --now $_pkgname@master.service' ...
          server 节点的环境变量文件为 '/etc/$_pkgname/server.env' ...
          server 节点的启动命令为 'systemctl enable --now $_pkgname@server.service' ...
          client 节点的环境变量文件为 '/etc/$_pkgname/client.env' ...
          client 节点的启动命令为 'systemctl enable --now $_pkgname@client.service' ..."
    else
        note "master node environment file is '/etc/$_pkgname/master.env' ...
          master node start with 'systemctl enable --now $_pkgname@master.service' ...
          server node environment file is '/etc/$_pkgname/server.env' ...
          server node start with 'systemctl enable --now $_pkgname@server.service' ...
          client node environment file is '/etc/$_pkgname/client.env' ...
          client node start with 'systemctl enable --now $_pkgname@client.service' ..."
    fi
}

post_upgrade() {
    post_install
}