fix auth with smokeping's data directory

master
livejq 2 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 "${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 ""
read -rp "请输入数字选择:" num
@ -158,7 +158,6 @@ configureUb() {
#TCPPing
wget -O /usr/bin/tcpping http://www.vdberg.org/~richard/tcpping
chmod 755 /usr/bin/tcpping
chmod 777 -R /var/lib/smokeping/
#ufw
ufw allow 22/tcp && ufw allow ${port1:-20000}/tcp
ufw enable && systemctl enable ufw
@ -168,6 +167,7 @@ configureUb() {
#test
smokeping --debug || error=1
[[ $error -eq 1 ]] && echo -e "${RED}测试运行失败${PLAIN}" && exit 1
chmod 777 -R /var/lib/smokeping/
systemctl start apache2 smokeping || error=1
[[ $error -eq 1 ]] && echo -e "${RED}启动失败${PLAIN}" && exit 1
echo ""
@ -223,7 +223,6 @@ configureCe() {
#TCPPing
wget -O /usr/bin/tcpping http://www.vdberg.org/~richard/tcpping
chmod 755 /usr/bin/tcpping
chmod 777 -R /var/lib/smokeping/
#firewalld
systemctl restart firewalld && systemctl enable firewalld
firewall-cmd --zone=public --add-port=${port1:-20000}/tcp --permanent && firewall-cmd --reload
@ -232,6 +231,7 @@ configureCe() {
#test
smokeping --debug || error=1
[[ $error -eq 1 ]] && echo -e "${RED}测试运行失败${PLAIN}" && exit 1
chmod 777 -R /var/lib/smokeping/
systemctl start httpd smokeping || error=1
[[ $error -eq 1 ]] && echo -e "${RED}启动失败${PLAIN}" && exit 1
echo ""

Loading…
Cancel
Save