当前位置:网站首页>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
边栏推荐
- [combinatorial mathematics] counting model, common combinatorial numbers and combinatorial identities**
- [combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe
- 线程池:业务代码最常用也最容易犯错的组件
- C语言字符串练习
- CC2530 common registers for port initialization
- Kotlin学习快速入门(7)——扩展的妙用
- 【剑指 Offer 】64. 求1+2+…+n
- Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
- How to delete a specific line from a text file using the SED command?
- [2. Basics of Delphi grammar] 2 Object Pascal data type
猜你喜欢
网络安全web渗透技术
PHP online confusion encryption tutorial sharing + basically no solution
ANOVA example
Idea configuration plug-in
Le zèbre a été identifié comme un chien, et la cause de l'erreur d'AI a été trouvée par Stanford
什么是质押池,如何进行质押呢?
13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
[try to hack] active detection and concealment technology
CC2530 common registers for port interrupts
What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR
随机推荐
Kotlin学习快速入门(7)——扩展的妙用
HP 阵列卡排障一例
One brush 144 force deduction hot question-1 sum of two numbers (E)
远程办公之如何推进跨部门项目协作 | 社区征文
CC2530 common registers for watchdog
New features of C 10
MySQL single table field duplicate data takes the latest SQL statement
匯編實例解析--實模式下屏幕顯示
The most complete postman interface test tutorial in the whole network, API interface test
Analysis of variance summary
Arduino esp32: overall framework of lvgl project (I)
utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library
聊聊接口优化的几个方法
深入理解 SQL 中的 Grouping Sets 语句
浅谈拉格朗日插值及其应用
On Lagrange interpolation and its application
【剑指 Offer 】64. 求1+2+…+n
[try to hack] active detection and concealment technology
One brush 145 force deduction hot question-2 sum of two numbers (m)
MySQL user management