diff options
author | devome | 2024-01-22 10:54:30 +0800 |
---|---|---|
committer | devome | 2024-01-22 10:54:30 +0800 |
commit | ce6dbadb0ca73f7b61e9d35bc1f003a757153384 (patch) | |
tree | a9b87cad8e3468fea5afff8408bff409fdd0d2ef | |
parent | 1bb4ba23ce12c9ea4ffe84b43a97f3cb4d4ecb79 (diff) | |
download | aur-ce6dbadb0ca73f7b61e9d35bc1f003a757153384.tar.gz |
frp-panel: 0.0.11-3
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | frp-panel.install | 12 |
3 files changed, 24 insertions, 24 deletions
@@ -1,7 +1,7 @@ pkgbase = frp-panel pkgdesc = A multi node frp webui and for frp server and client management pkgver = 0.0.11 - pkgrel = 2 + pkgrel = 3 url = https://github.com/VaalaCat/frp-panel install = frp-panel.install arch = any @@ -2,7 +2,7 @@ pkgname="frp-panel" pkgver=0.0.11 -pkgrel=2 +pkgrel=3 pkgdesc="A multi node frp webui and for frp server and client management" arch=("any") url="https://github.com/VaalaCat/${pkgname}" @@ -30,15 +30,15 @@ prepare() { for element in App Master Server DB; do n1=$(grep -nP "^\s${element} struct \{" "$file_setting" | awk -F: '{print $1}') n2=$(grep -nP "env-prefix:\"${element^^}_\"" "$file_setting" | awk -F: '{print $1}') - awk -v n1="${n1}" -v n2="${n2}" -F '"' '{if(NR>n1 && NR<n2){print "##"$3" "$4","$5" "$6"\n#""'${element^^}_'"$2"=\"\"\n"}}' "$file_setting" >> master.env + awk -v n1="${n1}" -v n2="${n2}" -F '"' '{if(NR>n1 && NR<n2){print "##"$3" "$4","$5" "$6"\n#""'${element^^}_'"$2"=\"\"\n"}}' "$file_setting" >> ../master.env done for element in client server; do - grep -C1 -P "#APP_SECRET=|#MASTER_RPC_HOST=|#MASTER_RPC_PORT=|#MASTER_API_PORT=" master.env > "${element}.env" - echo "## For ${element} nodes, need append clientSecret and clientID after start command, such as: " >> "${element}.env" - echo "#START_PARAMS=\"-s 'b16379b1-349c-421f-83b2-78c45b5c6de2' -i '${element}'\"" >> "${element}.env" - echo "START_PARAMS=\"\"" >> "${element}.env" - sed -i '/--/d' "${element}.env" + grep -C1 -P "#APP_SECRET=|#MASTER_RPC_HOST=|#MASTER_RPC_PORT=|#MASTER_API_PORT=" ../master.env > "../${element}.env" + echo "## For ${element} nodes, need append clientSecret and clientID after start command, such as: " >> "../${element}.env" + echo "#START_PARAMS=\"-s 'b16379b1-349c-421f-83b2-78c45b5c6de2' -i '${element}'\"" >> "../${element}.env" + echo "START_PARAMS=\"\"" >> "../${element}.env" + sed -i '/--/d' "../${element}.env" done } @@ -58,20 +58,20 @@ build() { -o "${pkgname}" \ ./cmd/*.go - ./frp-panel completion zsh > _zsh - ./frp-panel completion bash > _bash - ./frp-panel completion fish > _fish + ./"${pkgname}" completion zsh > ../completion.zsh + ./"${pkgname}" completion bash > ../completion.bash + ./"${pkgname}" completion fish > ../completion.fish } package() { + install -Dm644 completion.zsh "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" + install -Dm644 completion.bash "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" + install -Dm644 completion.fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish" + install -Dm644 "${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" + install -Dm644 "${pkgname}@.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service" + install -Dm644 -t "${pkgdir}/etc/${pkgname}" {master,server,client}.env + cd "${pkgname}-${pkgver}" install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" - install -Dm644 _zsh "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}" - install -Dm644 _bash "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" - install -Dm644 _fish "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish" - - install -Dm644 "../${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" - install -Dm644 "../${pkgname}@.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}@.service" - install -Dm644 -t "${pkgdir}/etc/${pkgname}" {master,server,client}.env } diff --git a/frp-panel.install b/frp-panel.install index d4d7cf1966be..0a89147858bc 100644 --- a/frp-panel.install +++ b/frp-panel.install @@ -12,18 +12,18 @@ note() { post_install() { if [[ $LANG == "zh_CN.UTF-8" ]]; then - note "master 节点的环境变量文件为 '/etc/ftp-panel/master.env' ... + note "master 节点的环境变量文件为 '/etc/$_pkgname/master.env' ... master 节点的启动命令为 'systemctl enable --now $_pkgname@master.service' ... - server 节点的环境变量文件为 '/etc/ftp-panel/server.env' ... + server 节点的环境变量文件为 '/etc/$_pkgname/server.env' ... server 节点的启动命令为 'systemctl enable --now $_pkgname@server.service' ... - client 节点的环境变量文件为 '/etc/ftp-panel/client.env' ... + client 节点的环境变量文件为 '/etc/$_pkgname/client.env' ... client 节点的启动命令为 'systemctl enable --now $_pkgname@client.service' ..." else - note "master node environment file is '/etc/ftp-panel/master.env' ... + 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/ftp-panel/server.env' ... + 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/ftp-panel/client.env' ... + client node environment file is '/etc/$_pkgname/client.env' ... client node start with 'systemctl enable --now $_pkgname@client.service' ..." fi } |