Properly initialize runtime directory
This commit is contained in:
parent
b68bc7ddb5
commit
48c35aab63
@ -25,13 +25,9 @@ $original_stdin = $stdin.dup
|
|||||||
$original_stdout = $stdout.dup
|
$original_stdout = $stdout.dup
|
||||||
$original_stderr = $stderr.dup
|
$original_stderr = $stderr.dup
|
||||||
|
|
||||||
$run_base_path = "/run/github-fast-env"
|
$runtime_directory = "/run/github-fast-env"
|
||||||
|
|
||||||
unless File.directory?($run_base_path)
|
control_socket_path = "#{$runtime_directory}/github-fast-envd.sock"
|
||||||
FileUtils.mkdir_p($run_base_path, :mode => 0700)
|
|
||||||
end
|
|
||||||
|
|
||||||
control_socket_path = "#{$run_base_path}/github-fast-envd.sock"
|
|
||||||
|
|
||||||
if File.exist?(control_socket_path) and File.socket?(control_socket_path)
|
if File.exist?(control_socket_path) and File.socket?(control_socket_path)
|
||||||
File.unlink(control_socket_path)
|
File.unlink(control_socket_path)
|
||||||
|
@ -4,6 +4,8 @@ After=github-enterprise.target
|
|||||||
Wants=github-enterprise.target
|
Wants=github-enterprise.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
RuntimeDirectory=github-fast-env
|
||||||
|
RuntimeDirectoryMode=0700
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/data/github/current/bin/safe-ruby /usr/bin/github-fast-envd
|
ExecStart=/data/github/current/bin/safe-ruby /usr/bin/github-fast-envd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user