Class: Rust

Inherits:
Object
  • Object
show all
Defined in:
lib/servers/rust.rb

Overview

Create a Rust server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRust

Returns a new instance of Rust.



4
5
6
7
# File 'lib/servers/rust.rb', line 4

def initialize
  @name = "rust"
  @app_id = "258550"
end

Instance Attribute Details

#app_idObject (readonly)

Returns the value of attribute app_id.



3
4
5
# File 'lib/servers/rust.rb', line 3

def app_id
  @app_id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/servers/rust.rb', line 3

def name
  @name
end

Instance Method Details

#launch(install_path, password = "_", ip = "0.0.0.0", port = "28015") ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/servers/rust.rb', line 9

def launch(install_path, password = "_", ip = "0.0.0.0", port = "28015")
  "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{install_path}/RustDedicated_Data/Plugins/x86_64 &&
  cd #{install_path} &&
  ./RustDedicated +server.ip #{ip} +server.port #{port} +server.identity rust +rcon.web 1 \
  +rcon.ip #{ip} \
  +rcon.port 28016 \
  +rcon.password #{password}"
end