From 8b67bda9744757f1dd88bc45c8afd4a351d300c0 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 6 May 2009 20:52:08 -0500 Subject: [PATCH] * bin/ec2-cost: handle on/off configuration like *all* other status scripts, no need for FORCE Signed-off-by: Dustin Kirkland --- bin/ec2-cost | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/bin/ec2-cost b/bin/ec2-cost index cefcc90b..3b669154 100755 --- a/bin/ec2-cost +++ b/bin/ec2-cost @@ -17,31 +17,17 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -FORCE=0 DETAIL=0 PKG="byobu" -# Default is "off" -p="ec2-cost" -grep -qs "^$p=1$" "$HOME/.$PKG/status" && FORCE=1 -grep -qs "^$p=0$" "$HOME/.$PKG/status" && FORCE=0 - for arg in $@; do case "$arg" in - -f|--force) - FORCE=1 - ;; -d|--detail) DETAIL=1 ;; esac done -# Exit immediately if this is not an Amazon EC2 instance, we're not -# manually turned on, and we're not in force mode -[ -r "/etc/ec2_version" -o -r "$HOME/.$PKG/ec2-cost" -o "$FORCE" = "1" ] -[ "$?" = "0" ] || exit 0 - # Approximate Instance Cost Basis # US Europe # Small (1cpu, 32bit) $0.10/h $0.11/h