当前位置:网站首页>Squid service startup script
Squid service startup script
2022-07-03 16:59:00 【Brother Xing plays with the clouds】
Squid The service starts with the system , Because it is built as a production environment , Therefore, it is still started as a system service , So find a simple code on the Internet , Available startup scripts .
squid The installation path is /usr/local/squid
#!/bin/bash # chkconfig: 345 61 61 # description: squid is a web cache server # processname: squid . /etc/rc.d/init.d/functions case $1 in "start") /usr/local/squid/sbin/squid -s if [ $? == "0" ];then echo "squid start ok" else echo "please check the log" fi ;; "stop") /usr/local/squid/sbin/squid -k shutdown if [ $? == "0" ];then echo "squid stop ok" else echo "please check the log" fi ;; "restart") /usr/local/squid/sbin/squid -k shutdown if [ $? == "0" ];then /usr/local/squid/sbin/squid -s if [ $? == "0" ];then echo "squid restart ok" else /usr/local/squid/sbin/squid -s if [ $? == "0" ];then echo "squid restart ok" else echo "please check the log" fi fi fi ;; *) echo "Usage only start|stop|restart" ;; esac
Put this file in /etc/init.d/ Directory and named squid
chmod +x /etc/init.d/squid
chkconfig --add squid
If appear squid Service not supported chkconfig
Then change the above chkconfig: 345 61 61 These numbers
边栏推荐
- BYD and great wall hybrid market "get together" again
- MySQL user management
- Le zèbre a été identifié comme un chien, et la cause de l'erreur d'AI a été trouvée par Stanford
- Squid 服务启动脚本
- What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
- 定义一个结构体Fraction,表示分数,用于表示 2/3, 5/6这样的分数
- Meituan side: why does thread crash not cause JVM crash
- Take you to API development by hand
- CC2530 common registers for port initialization
- [Jianzhi offer] 58 - ii Rotate string left
猜你喜欢

建立自己的网站(23)

Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer

NLP四范式:范式一:非神经网络时代的完全监督学习(特征工程);范式二:基于神经网络的完全监督学习(架构工程);范式三:预训练,精调范式(目标工程);范式四:预训练,提示,预测范式(Prompt工程)

CC2530 common registers for timer 1

图之深度优先搜索

What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material

One brush 145 force deduction hot question-2 sum of two numbers (m)

Talk about several methods of interface optimization

Le zèbre a été identifié comme un chien, et la cause de l'erreur d'AI a été trouvée par Stanford

CC2530 common registers for serial communication
随机推荐
One brush 145 force deduction hot question-2 sum of two numbers (m)
[2. Basics of Delphi grammar] 2 Object Pascal data type
Bcvp developer community 2022 exclusive peripheral first bullet
Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error
MySQL single table field duplicate data takes the latest SQL statement
Thread pool executes scheduled tasks
arduino-esp32:LVGL项目(一)整体框架
跨境电商:外贸企业做海外社媒营销的优势
29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
【Try to Hack】主动侦查隐藏技术
PHP converts a one-dimensional array into a two-dimensional array
C语言按行修改文件
RF Analyze Demo搭建 Step by Step
IDEA-配置插件
To resist 7-Zip, list "three sins"? Netizen: "is the third key?"
Meituan side: why does thread crash not cause JVM crash
[combinatorics] recursive equation (outline of recursive equation content | definition of recursive equation | example description of recursive equation | Fibonacci Series)
What is the difference between 14Cr1MoR container plate and 14Cr1MoR (H)? Chemical composition and performance analysis of 14Cr1MoR
数据分析必备的能力
What is the pledge pool and how to pledge?