Browse Source

Properly initialize runtime directory

master
Patrick Lühne 2 years ago
parent
commit
48c35aab63
Signed by: patrick GPG Key ID: 05F3611E97A70ABF
  1. 8
      github-fast-env/github-fast-envd.rb
  2. 2
      github-fast-env/systemd/github-fast-envd.service

8
github-fast-env/github-fast-envd.rb

@ -25,13 +25,9 @@ $original_stdin = $stdin.dup
$original_stdout = $stdout.dup
$original_stderr = $stderr.dup
$run_base_path = "/run/github-fast-env"
$runtime_directory = "/run/github-fast-env"
unless File.directory?($run_base_path)
FileUtils.mkdir_p($run_base_path, :mode => 0700)
end
control_socket_path = "#{$run_base_path}/github-fast-envd.sock"
control_socket_path = "#{$runtime_directory}/github-fast-envd.sock"
if File.exist?(control_socket_path) and File.socket?(control_socket_path)
File.unlink(control_socket_path)

2
github-fast-env/systemd/github-fast-envd.service

@ -4,6 +4,8 @@ After=github-enterprise.target
Wants=github-enterprise.target
[Service]
RuntimeDirectory=github-fast-env
RuntimeDirectoryMode=0700
Type=simple
ExecStart=/data/github/current/bin/safe-ruby /usr/bin/github-fast-envd

Loading…
Cancel
Save