running.sh 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. #!/bin/bash
  2. red="\e[1;31m"
  3. green="\e[0;32m"
  4. NC="\e[0m"
  5. status="$(systemctl show ssh.service --no-page)"
  6. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  7. if [ "${status_text}" == "active" ]
  8. then
  9. echo -e " SSH : SSH Service is "$green"running"$NC""
  10. else
  11. echo -e " SSh : SSH Service is "$red"not running (Error)"$NC""
  12. fi
  13. status="$(systemctl show stunnel4.service --no-page)"
  14. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  15. if [ "${status_text}" == "active" ]
  16. then
  17. echo -e " Stunnel : Stunnel Service is "$green"running"$NC""
  18. else
  19. echo -e " Stunnel : Stunnel Service is "$red"not running (Error)"$NC""
  20. fi
  21. status="$(systemctl show dropbear.service --no-page)"
  22. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  23. if [ "${status_text}" == "active" ]
  24. then
  25. echo -e " DropBear : DropBear Service is "$green"running"$NC""
  26. else
  27. echo -e " DropBear : DropBear Service is "$red"not running (Error)"$NC""
  28. fi
  29. status="$(systemctl show v2ray@none.service --no-page)"
  30. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  31. if [ "${status_text}" == "active" ]
  32. then
  33. echo -e " V2ray Non TLS : V2ray Non TLS Service is "$green"running"$NC""
  34. else
  35. echo -e " V2ray Non TLS : V2ray Non TLS Service is "$red"not running (Error)"$NC""
  36. fi
  37. status="$(systemctl show v2ray.service --no-page)"
  38. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  39. if [ "${status_text}" == "active" ]
  40. then
  41. echo -e " V2ray TLS : V2ray TLS Service is "$green"running"$NC""
  42. else
  43. echo -e " V2ray TLS : V2ray TLS Service is "$red"not running (Error)"$NC""
  44. fi
  45. status="$(systemctl show v2ray@vless.service --no-page)"
  46. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  47. if [ "${status_text}" == "active" ]
  48. then
  49. echo -e " Vless TLS : Vless TLS Service is "$green"running"$NC""
  50. else
  51. echo -e " Vless TLS : Vless TLS Service is "$red"not running (Error)"$NC""
  52. fi
  53. status="$(systemctl show v2ray@vnone.service --no-page)"
  54. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  55. if [ "${status_text}" == "active" ]
  56. then
  57. echo -e " Vless Non TLS : Vless Non TLS Service is "$green"running"$NC""
  58. else
  59. echo -e " Vless Non TLS : Vless Non TLS Service is "$red"not running (Error)"$NC""
  60. fi
  61. status="$(systemctl show trojan --no-page)"
  62. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  63. if [ "${status_text}" == "active" ]
  64. then
  65. echo -e " Trojan : Trojan Service is "$green"running"$NC""
  66. else
  67. echo -e " Trojan : Trojan Service is "$red"not running (Error)"$NC""
  68. fi
  69. status="$(systemctl show squid.service --no-page)"
  70. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  71. if [ "${status_text}" == "active" ]
  72. then
  73. echo -e " Squid : Squid Service is "$green"running"$NC""
  74. else
  75. echo -e " Squid : Squid Service is "$red"not running (Error)"$NC""
  76. fi
  77. status="$(systemctl show openvpn.service --no-page)"
  78. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  79. if [ "${status_text}" == "active" ]
  80. then
  81. echo -e " Openvpn : Openvpn Service is "$green"running"$NC""
  82. else
  83. echo -e " Openvpn : Openvpn Service is "$red"not running (Error)"$NC""
  84. fi
  85. status="$(systemctl show wg-quick@wg0 --no-page)"
  86. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  87. if [ "${status_text}" == "active" ]
  88. then
  89. echo -e " Wireguard : Wireguard Service is "$green"running"$NC""
  90. else
  91. echo -e " Wireguard : Wireguard Service is "$red"not running (Error)"$NC""
  92. fi
  93. status="$(systemctl show accel-ppp.service --no-page)"
  94. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  95. if [ "${status_text}" == "active" ]
  96. then
  97. echo -e " SSTP : SSTP Service is "$green"running"$NC""
  98. else
  99. echo -e " SSTP : SSTP Service is "$red"not running (Error)"$NC""
  100. fi
  101. status="$(systemctl show ssrmu --no-page)"
  102. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  103. if [ "${status_text}" == "active" ]
  104. then
  105. echo -e " SSR : SSR Service is "$green"running"$NC""
  106. else
  107. echo -e " SSR : SSR Service is "$red"not running (Error)"$NC""
  108. fi
  109. status="$(systemctl show shadowsocks-libev.service --no-page)"
  110. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  111. if [ "${status_text}" == "active" ]
  112. then
  113. echo -e " Shadowsocks : Shadowsocks Service is "$green"running"$NC""
  114. else
  115. echo -e " Shadowsocks : Sadhowsocks Service is "$red"not running (Error)"$NC""
  116. fi
  117. status="$(systemctl show xl2tpd.service --no-page)"
  118. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  119. if [ "${status_text}" == "active" ]
  120. then
  121. echo -e " L2tp : L2tp Service is "$green"running"$NC""
  122. else
  123. echo -e " L2tp : L2tp Service is "$red"not running (Error)"$NC""
  124. fi
  125. status="$(systemctl show pptpd.service --no-page)"
  126. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  127. if [ "${status_text}" == "active" ]
  128. then
  129. echo -e " PPTP : PPTP Service is "$green"running"$NC""
  130. else
  131. echo -e " PPTP : PPTP Service is "$red"not running (Error)"$NC""
  132. fi
  133. status="$(systemctl show nginx.service --no-page)"
  134. status_text=$(echo "${status}" | grep 'ActiveState=' | cut -f2 -d=)
  135. if [ "${status_text}" == "active" ]
  136. then
  137. echo -e " Nginx : Nginx Service is "$green"running"$NC""
  138. else
  139. echo -e " Nginx : Nginx Service is "$red"not running (Error)"$NC""
  140. fi