#!/bin/sh
if [ -d /proc/acpi/battery ]; then
	results="`find /proc/acpi/battery -mindepth 1 -type d`"
	if [ ! -z "$results" ]; then
		case "$results" in
			*'BAT'*)	exec vattery	;;
			*)			exec fatdog-battery-applet.sh	;;
		esac
	fi
elif [ -d /sys/class/power_supply ]; then
   results="`find /sys/class/power_supply -mindepth 1 -name BAT*`"
   if [ ! -z "$results" ]; then
      case "$results" in
         *'BAT'*)   exec vattery   ;;
         *)         exec fatdog-battery-applet.sh   ;;
      esac
   fi 
fi
