From 3e9d490ac9467bb63e873729e179a9e8ff6c382e Mon Sep 17 00:00:00 2001 From: toby Date: Tue, 28 Mar 2023 22:00:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'kongkong=5Fupdate.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kongkong_update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kongkong_update.sh b/kongkong_update.sh index 4dbb330..f13cf85 100644 --- a/kongkong_update.sh +++ b/kongkong_update.sh @@ -5,7 +5,13 @@ remoteid=`cat /usr/local/bin/frpc.ini | grep "meta_id =" | cut -d " " -f 3` python3 kongkong_init.py "$remoteid" sudo cp frpc.ini /usr/local/bin -sudo yum install -y php-cli php-snmp +if command -v yum &> /dev/null +then + sudo yum install -y php-cli php-snmp +else + sudo apt-get install -y php-cli php-snmp +fi + curl -o test_scandev.php https://git.tobyliu.com/toby/common-tools/raw/branch/main/test_scandev.php sudo cp test_scandev.php /usr/local/bin/ CMD='/usr/bin/php /usr/local/bin/test_scandev.php'