当前位置:网站首页>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
- Le zèbre a été identifié comme un chien, et la cause de l'erreur d'AI a été trouvée par Stanford
- How to delete a specific line from a text file using the SED command?
- 什么是质押池,如何进行质押呢?
- What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
- 【剑指 Offer 】64. 求1+2+…+n
- Mysql database DDL and DML
- 浅谈拉格朗日插值及其应用
- [combinatorics] recursive equation (constant coefficient linear homogeneous recursive equation | constant coefficient, linear, homogeneous concept description | constant coefficient linear homogeneous
- Thread pool: the most common and error prone component of business code
猜你喜欢
(Supplement) double pointer topic
聊聊接口优化的几个方法
PHP online confusion encryption tutorial sharing + basically no solution
Talk about several methods of interface optimization
人生还在迷茫?也许这些订阅号里有你需要的答案!
ucore概述
What material is sa537cl2 equivalent to in China? Sa537cl2 corresponding material
Le zèbre a été identifié comme un chien, et la cause de l'erreur d'AI a été trouvée par Stanford
网络安全web渗透技术
Mysql database -dql
随机推荐
远程办公之如何推进跨部门项目协作 | 社区征文
Leetcode: lucky number in matrix
Recommendation of good books on learning QT programming
LeetCode 1658. Minimum operand to reduce x to 0
Thread pool executes scheduled tasks
Static program analysis (I) -- Outline mind map and content introduction
29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
在iptables防火墙下开启vsftpd的端口
Meituan side: why does thread crash not cause JVM crash
MySQL single table field duplicate data takes the latest SQL statement
[mathematical logic] equivalent calculus and reasoning calculus of propositional logic (propositional logic | equivalent calculus | principal conjunctive (disjunctive) paradigm | reasoning calculus)**
What is the material of sa302grc? American standard container plate sa302grc chemical composition
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
【Try to Hack】主动侦查隐藏技术
mysql用户管理
[combinatorial mathematics] counting model, common combinatorial numbers and combinatorial identities**
【剑指 Offer 】64. 求1+2+…+n
HP 阵列卡排障一例
One brush 148 force deduction hot question-5 longest palindrome substring (m)