The best way to start | stop | reload | status

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

The best way to start | stop | reload | status

erdosain9
Hi.
mmm... im having a doubt.
I usually use Systemctl for start, stop, reload, and status; but sometimes i heard that it was not the best way to do these actions.
Way? I heard something wrong?
And if not the best way, what would it be?

1) squid -z
2) squid

???

And from there, how i can stop and reload, status??
And, if this is the best way, how do I start Squid automatically when the system boots?

(Or is it really not relevant?)

Thanks to all!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The best way to start | stop | reload | status

dijxie
W dniu 06.07.2017 o 15:08, erdosain9 pisze:
Hi.
mmm... im having a doubt.
I usually use Systemctl for start, stop, reload, and status; but sometimes i
heard that it was not the best way to do these actions.
Way? I heard something wrong?
And if not the best way, what would it be?

1) squid -z
2) squid

???

And from there, how i can stop and reload, status??
And, if this is the best way, how do I start Squid automatically when the
system boots?

(Or is it really not relevant?)

Thanks to all!



--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/The-best-way-to-start-stop-reload-status-tp4682998.html
Sent from the Squid - Users mailing list archive at Nabble.com.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

squid -k check|reconfigure etc for interaction with squid process. Reconfigure is for reload config files, external ACL files, as well as for i.e. refreshing cached group members in case if external ACL used.
Usually, the best way to start/stop/restart squid is to use your init, i.e. systemctl stop squid, service squid stop, /etc/init.d/squid stop. Depending of distro, squid usually has systemd-unit-file or upstart/init script. For reload configuration, personally I always use squid -k reconfigure.

But if you want to/need to, you do not have to run squid as a daemon/service, you can start it via cron or whatever you like. Init is usually the best way, since it handles things like order, dependiencies, runlevels etc. - that is what is it for.

-- 
Greets, Dijx.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The best way to start | stop | reload | status

Amos Jeffries
Administrator
In reply to this post by erdosain9
On 07/07/17 01:08, erdosain9 wrote:
> Hi.
> mmm... im having a doubt.
> I usually use Systemctl for start, stop, reload, and status; but sometimes i
> heard that it was not the best way to do these actions.
> Way? I heard something wrong?

Because systemctl is a daemon manager. The "squid" binary is also a
daemon manager. Having a daemon manager manage another daemon manager
leads to some very odd behaviours.

People are finding out the hard way what those problems are since
systemd merged daemon management into the init system on many OS.

NP: In Squid-4 we have completely redesigned the way Squid processes
integrate so that it can be run under a different daemon manager.


> And if not the best way, what would it be?
>
> 1) squid -z
> 2) squid
>
> ???
>

The squid -k options. See
<http://www.squid-cache.org/Versions/v3/3.5/manuals/squid.html>

NP: -z is to format or repair the cache_dir storage area(s).


> And from there, how i can stop and reload, status??

"squid -k check" for status, it will exit with an error message if Squid
is not running, and succeed if one is running.

The others should be obvious from the above documentation manual.


> And, if this is the best way, how do I start Squid automatically when the
> system boots?

If you are using a packaged binary the vendor should have setup
appropriate integration to be installed already.

Otherwise, the tools/ directory in Squid source bundles contain whatever
is needed for integration into the various init systems that version of
Squid can be used with. For Squid-3 that is any init system that
supports rc.d scripting.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The best way to start | stop | reload | status

erdosain9
Ok, thank you all!
Loading...