We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95c6427 commit 363e89bCopy full SHA for 363e89b
1 file changed
start.sh
@@ -5,6 +5,16 @@ set -e
5
# Start squid service
6
start_squid()
7
{
8
+ # 清理可能存在的 PID 文件
9
+ if [ -f /run/squid.pid ]; then
10
+ echo "Cleaning up stale Squid PID file..."
11
+ rm -f /run/squid.pid
12
+ fi
13
+
14
+ # 确保 Squid 进程完全停止
15
+ service squid stop 2>/dev/null || true
16
+ sleep 2
17
18
service squid start
19
if [ ! `service squid status | grep "squid is running" | wc -l` -gt 0 ]; then
20
echo "Error: failed to start squid service" >&2;
0 commit comments