Skip to content

Commit

Permalink
简单调整
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang2635 committed Jan 27, 2023
1 parent 2d14986 commit 639fe3a
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Run_FRPC.sh → run_frpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,36 @@
MODDIR="$(dirname $(readlink -f "$0"))"
. ${MODDIR}/files/status.conf

Start_FRPC() {
start_frpc() {
nohup ${MODDIR}/files/bin/frpc-${F_ARCH} -c ${DATADIR}/frpc/frpc.ini >/dev/null 2>&1 &
echo "$!" >${MODDIR}/files/frpc_run.pid
}

Verify_FRPC() {
verify_frpc() {
${MODDIR}/files/bin/frpc-${F_ARCH} verify -c ${DATADIR}/frpc/frpc.ini
}

Reload_FRPC() {
reload_frpc() {
${MODDIR}/files/bin/frpc-${F_ARCH} reload -c ${DATADIR}/frpc/frpc.ini
}

Work_Status() {
work_status() {
${MODDIR}/files/bin/frpc-${F_ARCH} status -c ${DATADIR}/frpc/frpc.ini | grep "running" | wc -l
}

if [ $# -ne 0 ]; then
case "$1" in
start)
Start_FRPC
start_frpc
;;
reload)
Reload_FRPC
reload_frpc
;;
verify)
Verify_FRPC
verify_frpc
;;
status)
Work_Status
work_status
;;
esac
else
exit 1
fi

0 comments on commit 639fe3a

Please sign in to comment.