Change how ruby executes commands
This commit is contained in:
parent
359656bdd6
commit
f2738686d5
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ class VouchersController < ApplicationController
|
|||
# GET /vouchers
|
||||
def index
|
||||
@vouchers = Voucher.all
|
||||
whitelist = %x(mcrcon -c -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} 'whitelist list' | sed 's/There are*.*whitelisted players: //g').gsub("\n", "").split(", ")
|
||||
whitelist = %x[mcrcon -c -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} 'whitelist list' | sed 's/There are*.*whitelisted players: //g'].gsub("\n", "").split(", ")
|
||||
|
||||
render json: { :vouchers => @vouchers, :whitelist => whitelist }.to_json
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue