fix auth with smokeping's data directory

master
livejq 3 years ago
parent 79dfc5efee
commit b58d6b388b
  1. 6
      AutoPing.sh

@ -22,7 +22,7 @@ selectAction() {
echo -e "${GREEN} \ 直接回车一起安装 / ${PLAIN}" echo -e "${GREEN} \ 直接回车一起安装 / ${PLAIN}"
echo -e "${GREEN} ========================================================= ${PLAIN}" echo -e "${GREEN} ========================================================= ${PLAIN}"
echo -e "${YELLOW} System requirements: ${PLAIN}${RED}CentOS 7${PLAIN}${YELLOW} or ${PLAIN}${RED}Ubuntu 20.04${PLAIN}${YELLOW}. ${PLAIN}" echo -e "${YELLOW} System requirements: ${PLAIN}${RED}CentOS 7${PLAIN}${YELLOW} or ${PLAIN}${RED}Ubuntu 20.04${PLAIN}${YELLOW}. ${PLAIN}"
echo -e "${YELLOW} Version: ${PLAIN}${GREEN}1.0.5${PLAIN}${YELLOW} (20 Mar. 2022) ${PLAIN}" echo -e "${YELLOW} Version: ${PLAIN}${GREEN}1.0.6${PLAIN}${YELLOW} (23 Mar. 2022) ${PLAIN}"
echo -e "${YELLOW} Copyright (C) 2021 liveJQ cloud@livejq.fun ${PLAIN}" echo -e "${YELLOW} Copyright (C) 2021 liveJQ cloud@livejq.fun ${PLAIN}"
echo "" echo ""
read -rp "请输入数字选择:" num read -rp "请输入数字选择:" num
@ -158,7 +158,6 @@ configureUb() {
#TCPPing #TCPPing
wget -O /usr/bin/tcpping http://www.vdberg.org/~richard/tcpping wget -O /usr/bin/tcpping http://www.vdberg.org/~richard/tcpping
chmod 755 /usr/bin/tcpping chmod 755 /usr/bin/tcpping
chmod 777 -R /var/lib/smokeping/
#ufw #ufw
ufw allow 22/tcp && ufw allow ${port1:-20000}/tcp ufw allow 22/tcp && ufw allow ${port1:-20000}/tcp
ufw enable && systemctl enable ufw ufw enable && systemctl enable ufw
@ -168,6 +167,7 @@ configureUb() {
#test #test
smokeping --debug || error=1 smokeping --debug || error=1
[[ $error -eq 1 ]] && echo -e "${RED}测试运行失败${PLAIN}" && exit 1 [[ $error -eq 1 ]] && echo -e "${RED}测试运行失败${PLAIN}" && exit 1
chmod 777 -R /var/lib/smokeping/
systemctl start apache2 smokeping || error=1 systemctl start apache2 smokeping || error=1
[[ $error -eq 1 ]] && echo -e "${RED}启动失败${PLAIN}" && exit 1 [[ $error -eq 1 ]] && echo -e "${RED}启动失败${PLAIN}" && exit 1
echo "" echo ""
@ -223,7 +223,6 @@ configureCe() {
#TCPPing #TCPPing
wget -O /usr/bin/tcpping http://www.vdberg.org/~richard/tcpping wget -O /usr/bin/tcpping http://www.vdberg.org/~richard/tcpping
chmod 755 /usr/bin/tcpping chmod 755 /usr/bin/tcpping
chmod 777 -R /var/lib/smokeping/
#firewalld #firewalld
systemctl restart firewalld && systemctl enable firewalld systemctl restart firewalld && systemctl enable firewalld
firewall-cmd --zone=public --add-port=${port1:-20000}/tcp --permanent && firewall-cmd --reload firewall-cmd --zone=public --add-port=${port1:-20000}/tcp --permanent && firewall-cmd --reload
@ -232,6 +231,7 @@ configureCe() {
#test #test
smokeping --debug || error=1 smokeping --debug || error=1
[[ $error -eq 1 ]] && echo -e "${RED}测试运行失败${PLAIN}" && exit 1 [[ $error -eq 1 ]] && echo -e "${RED}测试运行失败${PLAIN}" && exit 1
chmod 777 -R /var/lib/smokeping/
systemctl start httpd smokeping || error=1 systemctl start httpd smokeping || error=1
[[ $error -eq 1 ]] && echo -e "${RED}启动失败${PLAIN}" && exit 1 [[ $error -eq 1 ]] && echo -e "${RED}启动失败${PLAIN}" && exit 1
echo "" echo ""

Loading…
Cancel
Save