gsd-cli 0.1.29 → 0.1.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli/game_hash.rb +10 -0
- data/lib/cli/install.rb +2 -1
- data/lib/cli/run.rb +2 -0
- data/lib/cli/update.rb +2 -0
- data/lib/cli.rb +4 -144
- 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: e38834e968c357480ada5325a71d6e02c1e4d8a876117e53bf9f39d905d4e50a
|
4
|
+
data.tar.gz: efe9e3676e13c323e7ea68fdcb3909a104da507d88b1587768de4c178b4db14c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d9d2cde923e7431958e485ace80f9a6063d7df3a485a5545f1b39c7f5f7583037f6a991b4fadf9d7699af48ea9e1629fc196112fe46a1f929153b49499602a0
|
7
|
+
data.tar.gz: 42c5219aaadc01bd1829a8852dfa61e40f33f0d1844f5b0ae5a665a4bedb0846ffb61aec8ff5b885dfb5cb5146ffa382ad4b3a177c73f4c026f33d86ff0349f9
|
data/lib/cli/game_hash.rb
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
require "servers/gmod"
|
2
|
+
require "servers/rust"
|
3
|
+
require "servers/terraria"
|
4
|
+
require "servers/starbound"
|
5
|
+
require "servers/seven_days"
|
6
|
+
require "servers/team_fortress"
|
7
|
+
require "servers/minecraft_ftb"
|
8
|
+
require "servers/minecraft_spigot"
|
9
|
+
require "servers/ace_of_spades"
|
10
|
+
|
1
11
|
def game_hash
|
2
12
|
{
|
3
13
|
"rust" => Rust.new,
|
data/lib/cli/install.rb
CHANGED
data/lib/cli/run.rb
CHANGED
data/lib/cli/update.rb
CHANGED
data/lib/cli.rb
CHANGED
@@ -1,151 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "yaml"
|
4
|
-
require "colorize"
|
5
3
|
require "commander/import"
|
6
|
-
require "game_template"
|
7
|
-
require "servers/gmod"
|
8
|
-
require "servers/rust"
|
9
|
-
require "servers/terraria"
|
10
|
-
require "servers/starbound"
|
11
|
-
require "servers/seven_days"
|
12
|
-
require "servers/team_fortress"
|
13
|
-
require "servers/minecraft_ftb"
|
14
|
-
require "servers/minecraft_spigot"
|
15
|
-
require "servers/ace_of_spades"
|
16
|
-
|
17
|
-
def userdata
|
18
|
-
{
|
19
|
-
"rust" => Rust.new,
|
20
|
-
"sdtd" => SevenDays.new,
|
21
|
-
"gmod" => GarrysMod.new,
|
22
|
-
"aos" => AceOfSpades.new,
|
23
|
-
"tf2" => TeamFortress.new,
|
24
|
-
"ftb" => MinecraftFtb.new,
|
25
|
-
"terraria" => Terraria.new,
|
26
|
-
"starbound" => Starbound.new,
|
27
|
-
"minecraft" => MinecraftSpigot.new
|
28
|
-
}
|
29
|
-
end
|
30
|
-
|
31
|
-
@games = userdata
|
32
4
|
|
33
5
|
program :name, "gsd-cli"
|
34
|
-
program :version, "0.1.
|
6
|
+
program :version, "0.1.30"
|
35
7
|
program :description, "A cli tool to deploy & manage dedicated game servers on Linux"
|
36
8
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
# c.description = "Installs and deploy a dedicated game server as a daemon (systemd unit)."
|
41
|
-
# c.option "--path OPTIONAL", String, "Path that the game server will be installed to."
|
42
|
-
# c.option "--devmode OPTIONAL", String, "To run from source or as a Gem. ('y' to run from source)"
|
43
|
-
# c.option "--steamuser OPTIONAL", String, "Steam user account required to install certain games."
|
44
|
-
# c.option "--steampassword OPTIONAL", String, "Steam account password for installing certain games."
|
45
|
-
# c.action do |args, options|
|
46
|
-
# abort("Install what? Provide a game name argument!") if (args.first().nil?)
|
47
|
-
# puts "Beginning installation process. This may take a while...".yellow
|
48
|
-
# game = @games[args.first()]
|
49
|
-
# GameTemplate.new(game)
|
50
|
-
# .install("/opt/#{game.name}", options.steamuser, options.steampassword)
|
51
|
-
# puts "Server installation & deployment complete!".green
|
52
|
-
# end
|
53
|
-
# end
|
54
|
-
|
55
|
-
# command :run do |c|
|
56
|
-
# c.syntax = "gsd run [args]"
|
57
|
-
# c.summary = "Run an installed dedicated game server as a new process."
|
58
|
-
# c.description = "Runs an installed dedicated game server as a new process. This command is used by the daemon and is not designed to be run manually."
|
59
|
-
# c.option "--path STRING", String, "Path that the game server will be installed to."
|
60
|
-
# c.action do |args, options|
|
61
|
-
# GameTemplate.new(@games[args.first()]).run(options.path)
|
62
|
-
# end
|
63
|
-
# end
|
64
|
-
|
65
|
-
# command :update do |c|
|
66
|
-
# c.syntax = "gsd update [args] [options]"
|
67
|
-
# c.summary = "Updates an installed dedicated game server."
|
68
|
-
# c.description = "Updates an installed dedicated game server."
|
69
|
-
# c.option "--path STRING", String, "Path that the game server will be update to."
|
70
|
-
# c.action do |args, options|
|
71
|
-
# GameTemplate.new(@games[args.first()], options.path).update(options.path)
|
72
|
-
# end
|
73
|
-
# end
|
74
|
-
|
75
|
-
# command :start do |c|
|
76
|
-
# c.syntax = "gsd start [args]"
|
77
|
-
# c.summary = "Start a installed dedicated game server."
|
78
|
-
# c.description = "Starts a dedicated game server daemon that has already been installed to the system."
|
79
|
-
# c.action do |args|
|
80
|
-
# GameTemplate.new(@games[args.first()]).start()
|
81
|
-
# end
|
82
|
-
# end
|
83
|
-
|
84
|
-
# command :restart do |c|
|
85
|
-
# c.syntax = "gsd restart [args]"
|
86
|
-
# c.summary = "Restart a installed dedicated game server."
|
87
|
-
# c.description = "Restarts a dedicated game server daemon that has already been installed to the system."
|
88
|
-
# c.option "--remote OPTIONAL", String, "Connection string to a remote host server."
|
89
|
-
# c.action do |args, options|
|
90
|
-
# GameTemplate.new(@games[args.first()], options.remote).restart()
|
91
|
-
# end
|
92
|
-
# end
|
93
|
-
|
94
|
-
# command :status do |c|
|
95
|
-
# c.syntax = "gsd status [args]"
|
96
|
-
# c.summary = "Display the status of a installed dedicated game server."
|
97
|
-
# c.description = "Requests and returns the status of a installed dedicated game server from systemd."
|
98
|
-
# c.action do |args|
|
99
|
-
# GameTemplate.new(@games[args.first()]).status()
|
100
|
-
# end
|
101
|
-
# end
|
102
|
-
|
103
|
-
# command :stop do |c|
|
104
|
-
# c.syntax = "gsd stop [args]"
|
105
|
-
# c.summary = "Stop running dedicated game server."
|
106
|
-
# c.description = "Stops a running dedicated game server daemon."
|
107
|
-
# c.action do |args|
|
108
|
-
# GameTemplate.new(@games[args.first()]).stop()
|
109
|
-
# end
|
110
|
-
# end
|
111
|
-
|
112
|
-
# command :enable do |c|
|
113
|
-
# c.syntax = "gsd enable [args]"
|
114
|
-
# c.summary = "Force a dedicated game server daemon to launch at system start."
|
115
|
-
# c.description = "Enables a dedicated game server daemon to start when the system starts."
|
116
|
-
# c.action do |args|
|
117
|
-
# GameTemplate.new(@games[args.first()]).stop()
|
118
|
-
# end
|
119
|
-
# end
|
120
|
-
|
121
|
-
# command :disable do |c|
|
122
|
-
# c.syntax = "gsd disable [args]"
|
123
|
-
# c.summary = "Disable a dedicated game server daemon from starting at system start."
|
124
|
-
# c.description = "Disables a dedicated game server daemon from starting when the system starts."
|
125
|
-
# c.action do |args|
|
126
|
-
# GameTemplate.new(@games[args.first()]).stop()
|
127
|
-
# end
|
128
|
-
# end
|
129
|
-
|
130
|
-
# command :list do |c|
|
131
|
-
# c.syntax = "gsd list"
|
132
|
-
# c.summary = "Provides a list of supported dedicated game servers."
|
133
|
-
# c.description = "Provides a list of available dedicated game servers and their status."
|
134
|
-
# c.action do
|
135
|
-
# puts "The following games are currently supported by gsd:".yellow.bold
|
136
|
-
# YAML.safe_load(File.read("#{File.dirname(__FILE__)}/../conf/supported_games.yml"))["games"]
|
137
|
-
# .each do |game|
|
138
|
-
# puts game.light_blue
|
139
|
-
# end
|
140
|
-
# end
|
141
|
-
# end
|
142
|
-
|
143
|
-
# command :uninstall do |c|
|
144
|
-
# c.syntax = "gsd uninstall [args]"
|
145
|
-
# c.summary = "Uninstall a dedicated game server."
|
146
|
-
# c.description = "Uninstalls and removes all files associated with a dedicated game server."
|
147
|
-
# c.option "--name STRING", String, "Name of the dedicated game server."
|
148
|
-
# c.action do |_args, _options|
|
149
|
-
# puts "Not Implemented"
|
150
|
-
# end
|
151
|
-
# end
|
9
|
+
require "cli/install"
|
10
|
+
require "cli/update"
|
11
|
+
require "cli/run"
|