mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-06-17 09:41:48 +02:00
squid unprivilleged
This commit is contained in:
commit
aec79126dc
1 changed files with 22 additions and 1 deletions
|
@ -40,7 +40,7 @@
|
|||
(respawn-delay 10)
|
||||
(start #~(make-forkexec-constructor
|
||||
(list
|
||||
"/run/privileged/bin/squid"
|
||||
#$(file-append pkg "/sbin/squid")
|
||||
"-f" #$config-file
|
||||
)
|
||||
#:pid-file #$pid-file
|
||||
|
@ -50,6 +50,27 @@
|
|||
#:resource-limits '((nofile 65535 65535))))
|
||||
(stop #~(make-kill-destructor)))))))
|
||||
|
||||
(define squid-privileged-shepherd-service
|
||||
(match-lambda
|
||||
(($ <squid-configuration> pkg port loglevel config-file pid-file log-file)
|
||||
(list
|
||||
(shepherd-service
|
||||
(provision '(squid))
|
||||
(documentation "Run squid.")
|
||||
(requirement '(user-processes))
|
||||
(respawn? #t)
|
||||
(respawn-delay 10)
|
||||
(start #~(make-forkexec-constructor
|
||||
(list
|
||||
"/run/privileged/bin/squid"
|
||||
"-f" #$config-file
|
||||
)
|
||||
#:pid-file #$pid-file
|
||||
#:log-file #$log-file
|
||||
#:user (passwd:uid (getpwnam "squid"))
|
||||
#:group (passwd:gid (getpwnam "squid"))
|
||||
#:resource-limits '((nofile 65535 65535))))
|
||||
(stop #~(make-kill-destructor)))))))
|
||||
|
||||
(define %squid-activation
|
||||
#~(begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue