From 81ad2019b19c68cf532195747410a1e15cdf5138 Mon Sep 17 00:00:00 2001 From: Daniel Steglich Date: Tue, 3 Mar 2015 21:18:31 +0100 Subject: [PATCH] use global defined string variables --- actions/dynamicdns | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/actions/dynamicdns b/actions/dynamicdns index 94a506dbd..fb5df74c6 100755 --- a/actions/dynamicdns +++ b/actions/dynamicdns @@ -16,6 +16,8 @@ UPDATEMINUTES=5 UPDATEMINUTESUNKNOWN=3600 TOOLNAME=ez-ipupdate UPDATE_TOOL=$(which ${TOOLNAME}) +DISABLED_STRING='disabled' +ENABLED_STRING='enabled' #Dirs and filenames CFGDIR="/etc/${TOOLNAME}/" @@ -155,51 +157,51 @@ doStatus() { PROC=$(pgrep ${TOOLNAME}) if [ -f ${CRONJOB} ];then - echo enabled + echo $ENABLED_STRING elif [ ! -z ${PROC} ];then - echo enabled + echo $ENABLED_STRING else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${server} ];then echo ${server} else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${host} ];then echo ${host} else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${user} ];then echo ${user} else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${pass} ];then echo ${pass} else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${ipurl} ];then echo ${ipurl} else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${updateurl} ];then echo ${updateurl} else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${basicauth} ];then echo ${basicauth} else - echo disabled + echo $DISABLED_STRING fi if [ ! -z ${ignoreCertError} ];then echo ${ignoreCertError} else - echo disabled + echo $DISABLED_STRING fi }