mcwrapper 1.6.5 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  module MCWrapper
2
2
  # VERSION = `#{ MCWRAPPER } --version`.split(/\s/).last
3
- VERSION = '1.6.5'
3
+ VERSION = '1.6.6'
4
4
  end
@@ -6,7 +6,7 @@
6
6
  # https://github.com/spikegrobstein/mcwrapper
7
7
  ##
8
8
 
9
- MCWRAPPER_VERSION="1.6.5"
9
+ MCWRAPPER_VERSION="1.6.6"
10
10
 
11
11
  #### Exit Codes
12
12
 
@@ -87,11 +87,16 @@ function errcho {
87
87
  }
88
88
 
89
89
  # absolutely, under no circumstances, let mcwrapper be run as root!!!!
90
- if [[ `id -u` = 0 ]]; then
90
+ # well, unless they set ALLOW_ROOT=1, then it's ok.
91
+ # this can be desireable under specific circumstances, so may as well have a workaround.
92
+ if [[ -z "$ALLOW_ROOT" && `id -u` = 0 ]]; then
91
93
  errcho "You have started mcwrapper as root."
92
94
  errcho "This is not recommended. Please run as an un-privilaged user."
95
+ errcho "If you *must* run as root, you can execute: ALLOW_ROOT=1 mcwrapper start"
93
96
  errcho ""
94
97
  exit $EXIT_RUNNING_AS_ROOT
98
+ elif [[ ! -z "$ALLOW_ROOT" && `id -u` = 0 ]]; then
99
+ errcho "Warning: Running as root."
95
100
  fi
96
101
 
97
102
  function print_usage {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcwrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5
4
+ version: 1.6.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-15 00:00:00.000000000 Z
12
+ date: 2013-08-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Control your Minecraft server. start/stop and live backups.
15
15
  email: