Add systemd unit files for malpd and support systemd socket activation
This commit is contained in:
1 parent
c717b5d589
commit
1180849b44
3 files changed
+29
-5
No files matched your search
@@ -62,12 +62,16 @@ if Process.uid != 0
|
||||
exit(1)
|
||||
end
|
||||
|
||||
FileUtils.mkdir_p(File.dirname(SOCKET_PATH))
|
||||
FileUtils.rm_f(SOCKET_PATH)
|
||||
if ENV["LISTEN_FDS"]
|
||||
server = UNIXServer.for_fd(3)
|
||||
else
|
||||
FileUtils.mkdir_p(File.dirname(SOCKET_PATH))
|
||||
FileUtils.rm_f(SOCKET_PATH)
|
||||
|
||||
server = UNIXServer.new(SOCKET_PATH)
|
||||
File.chmod(0660, SOCKET_PATH)
|
||||
FileUtils.chown(nil, "apache", SOCKET_PATH)
|
||||
server = UNIXServer.new(SOCKET_PATH)
|
||||
File.chmod(0660, SOCKET_PATH)
|
||||
FileUtils.chown(nil, "apache", SOCKET_PATH)
|
||||
end
|
||||
|
||||
Signal.trap("TERM") { server.close }
|
||||
Signal.trap("INT") { server.close }
|
||||
|
||||
Reference in new issue
Block a user