Skip to content

Commit

Permalink
Move run check logic to passed functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Stealthii committed Jul 15, 2014
1 parent 985a618 commit dd6775e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions minecraft
Expand Up @@ -215,13 +215,8 @@ mc_stop() {
}

mc_reload() {
if is_running
then
echo "$SERVICE is running... reloading."
mc_command reload
else
echo "$SERVICE was not running. Not able to reload anything."
fi
echo "$SERVICE is running... reloading."
mc_command reload
}

check_backup_settings() {
Expand Down Expand Up @@ -674,8 +669,12 @@ case "$1" in
;;
reload)
# Reloads server configuration
mc_say "Reloading configurations.."
mc_reload
if is_running; then
mc_say "Reloading server configuration.."
mc_reload
else
echo "No running server."
fi
;;
whitelist)
if is_running; then
Expand Down

0 comments on commit dd6775e

Please sign in to comment.