gsd-cli 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli.rb +1 -1
- data/lib/game_template.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88010a2f2d174298334b1ce579b39f537ef186baa01ca6d638228490e52185a4
|
4
|
+
data.tar.gz: b0468cf23ad58c3e25ce3f05ca087c125a4a85ea9eeb5038723b9bb3e984db6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6ffb2e213e12e76e543643fd0ce0b7a2f9a3919a725e484f6e95e87ef6d72c3788379c2bc5d91cfd342653cef0516e215b27deb71fa29d83212e1204d1fa489
|
7
|
+
data.tar.gz: 846065044fb4639d0021b3543aa23eb0360f9be1de61801f231d0c02978166afcfd97afaed71ee64621a922068408da2f952d45014168ae9e25149c845c15418
|
data/lib/cli.rb
CHANGED
data/lib/game_template.rb
CHANGED
@@ -52,7 +52,7 @@ class GameTemplate
|
|
52
52
|
install_steam_server(install_path, steam_login)
|
53
53
|
end
|
54
54
|
@game.post_install(install_path) if defined? @game.post_install
|
55
|
-
create_unit_file(
|
55
|
+
create_unit_file(install_path)
|
56
56
|
end
|
57
57
|
|
58
58
|
def update(install_path)
|
@@ -72,21 +72,21 @@ class GameTemplate
|
|
72
72
|
system("$(which steamcmd) #{steam_login} +force_install_dir #{install_path} +app_update #{@game.app_id} validate +quit")
|
73
73
|
end
|
74
74
|
|
75
|
-
def create_unit_file(
|
75
|
+
def create_unit_file(install_path)
|
76
76
|
file_path = "/tmp/#{@game.name}.service"
|
77
77
|
`touch #{file_path}`
|
78
|
-
`echo #{unit_file_contents} >> #{file_path}`
|
78
|
+
`echo #{unit_file_contents(install_path)} >> #{file_path}`
|
79
79
|
system("mv -f #{"/tmp/#{@game.name}.service"} /etc/systemd/system/#{@game.name}.service")
|
80
80
|
end
|
81
81
|
|
82
82
|
def unit_file_contents(cli_path, install_path)
|
83
83
|
"[Unit]
|
84
84
|
After=network.target
|
85
|
-
Description
|
85
|
+
Description=Daemon for #{@game.name} dedicated server
|
86
86
|
[Install]
|
87
87
|
WantedBy=default.target
|
88
88
|
[Service]
|
89
89
|
Type=simple
|
90
|
-
ExecStart=#{
|
90
|
+
ExecStart=#{`which gsd-cli`.strip()} run #{@game.name} --path #{install_path}"
|
91
91
|
end
|
92
92
|
end
|