当前位置:网站首页>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
边栏推荐
- The way of wisdom (unity of knowledge and action)
- 比亚迪、长城混动市场再“聚首”
- MySQL Basics
- [combinatorics] recursive equation (characteristic equation and characteristic root | example of characteristic equation | root formula of monadic quadratic equation)
- 【剑指 Offer 】57 - II. 和为s的连续正数序列
- 大变局!全国房价,跌破万元大关
- BYD and great wall hybrid market "get together" again
- PHP online confusion encryption tutorial sharing + basically no solution
- 29: Chapter 3: develop Passport Service: 12: develop [obtain user account information, interface]; (use VO class to package the found data to meet the requirements of the interface for the returned da
- C语言字符串反转
猜你喜欢

Network security web penetration technology

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

29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)

utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library

Daily code 300 lines learning notes day 10

线程池:业务代码最常用也最容易犯错的组件

Take you to API development by hand

13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties

CC2530 common registers for timer 1

Web crawler knowledge day03
随机推荐
Capacités nécessaires à l'analyse des données
[combinatorics] recursive equation (constant coefficient linear homogeneous recursive equation | constant coefficient, linear, homogeneous concept description | constant coefficient linear homogeneous
The most complete postman interface test tutorial in the whole network, API interface test
What material is sa537cl2? Analysis of mechanical properties of American standard container plate
【剑指 Offer】58 - I. 翻转单词顺序
What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR
Rsync远程同步
匯編實例解析--實模式下屏幕顯示
Informatics Olympiad all in one YBT 1175: divide by 13 | openjudge noi 1.13 27: divide by 13
Web crawler knowledge day03
关于学习Qt编程的好书精品推荐
Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard
[Jianzhi offer] 64 Find 1+2+... +n
手把手带你入门 API 开发
Execute script unrecognized \r
跨境电商:外贸企业做海外社媒营销的优势
RF Analyze Demo搭建 Step by Step
utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library
C language modifies files by line
C语言字符串反转