当前位置:网站首页>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
边栏推荐
- 匯編實例解析--實模式下屏幕顯示
- CC2530 common registers for serial communication
- 27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
- 聊聊接口优化的几个方法
- 新库上线 | CnOpenData中国观鸟记录数据
- C语言按行修改文件
- C language modifies files by line
- [Jianzhi offer] 58 - ii Rotate string left
- Network security web penetration technology
- What material is sa537cl1? Sa537cl1 corresponds to the national standard material
猜你喜欢

Atom QT 16_ audiorecorder

Shentong express expects an annual loss of nearly 1billion

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

Kotlin学习快速入门(7)——扩展的妙用

Mysql database -dql

建立自己的网站(23)

CC2530 common registers for serial communication

Simulink oscilloscope data is imported into Matlab and drawn

Pools de Threads: les composants les plus courants et les plus sujets aux erreurs du Code d'affaires

Thread pool: the most common and error prone component of business code
随机推荐
CC2530 common registers for timer 1
What material is sa537cl1? Sa537cl1 corresponds to the national standard material
Define a structure fraction to represent a fraction, which is used to represent fractions such as 2/3 and 5/6
【剑指 Offer】58 - II. 左旋转字符串
Shentong express expects an annual loss of nearly 1billion
浅谈拉格朗日插值及其应用
[JDBC] API parsing
NLP four paradigms: paradigm 1: fully supervised learning in the era of non neural networks (Feature Engineering); Paradigm 2: fully supervised learning based on neural network (Architecture Engineeri
Squid 服务启动脚本
Rsync远程同步
On Lagrange interpolation and its application
Talk about several methods of interface optimization
【剑指 Offer】58 - I. 翻转单词顺序
MySQL single table field duplicate data takes the latest SQL statement
Thread pool executes scheduled tasks
[2. Basics of Delphi grammar] 2 Object Pascal data type
Assembly instance analysis -- screen display in real mode
Take you to API development by hand
Static program analysis (I) -- Outline mind map and content introduction
CC2530 common registers for watchdog