mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-30 06:08:37 +02:00
updating squid service
This commit is contained in:
parent
d2dc576311
commit
ce58a71df1
1 changed files with 43 additions and 2 deletions
|
@ -50,15 +50,56 @@
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list
|
(list
|
||||||
#$(file-append squid "/sbin/squid")
|
#$(file-append squid "/sbin/squid")
|
||||||
; "-d" #$loglevel
|
|
||||||
; "-N"
|
|
||||||
"-f" #$config-file
|
"-f" #$config-file
|
||||||
)
|
)
|
||||||
#:pid-file #$pid-file
|
#:pid-file #$pid-file
|
||||||
#:log-file #$log-file
|
#:log-file #$log-file
|
||||||
|
#:user (passwd:uid (getpwnam "squid"))
|
||||||
|
#:group (passwd:gid (getpwnam "squid"))
|
||||||
#:resource-limits '((nofile 16384 16384))
|
#:resource-limits '((nofile 16384 16384))
|
||||||
))
|
))
|
||||||
(stop #~(make-kill-destructor))
|
(stop #~(make-kill-destructor))
|
||||||
|
(actions (list
|
||||||
|
(shepherd-action
|
||||||
|
(name 'reload)
|
||||||
|
(documentation "Reload the settings file from disk.")
|
||||||
|
(procedure #~(lambda _ (exec-command
|
||||||
|
(list
|
||||||
|
#$(file-append squid "/sbin/squid")
|
||||||
|
"-d" #$loglevel
|
||||||
|
"-N"
|
||||||
|
"-k" "reconfigure"
|
||||||
|
"-f" #$config-file
|
||||||
|
)
|
||||||
|
)#t))
|
||||||
|
)
|
||||||
|
(shepherd-action
|
||||||
|
(name 'check-config)
|
||||||
|
(documentation "Check the settings file from disk.")
|
||||||
|
(procedure #~(lambda _ (exec-command
|
||||||
|
(list
|
||||||
|
#$(file-append squid "/sbin/squid")
|
||||||
|
"-d" #$loglevel
|
||||||
|
"-N"
|
||||||
|
"-k" "parse"
|
||||||
|
"-f" #$config-file
|
||||||
|
)
|
||||||
|
)#t))
|
||||||
|
)
|
||||||
|
(shepherd-action
|
||||||
|
(name 'kill)
|
||||||
|
(documentation "Ultimatly kill the squid process.")
|
||||||
|
(procedure #~(lambda _ (exec-command
|
||||||
|
(list
|
||||||
|
#$(file-append squid "/sbin/squid")
|
||||||
|
"-d" #$loglevel
|
||||||
|
"-N"
|
||||||
|
"-k" "kill"
|
||||||
|
"-f" #$config-file
|
||||||
|
)
|
||||||
|
)#t))
|
||||||
|
)
|
||||||
|
))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue