anchor.diff:        # Do not use su, to avoid creating a new process. Note: chroot version
         # is too old on Ubuntu Lucid, so this will fail. It works on Debian
         # Squeeze though (and later).
  -      exec chroot --userspec ${APP_USER}:${APP_GROUP} "/" sh -c "cd $(_p ${APP_HOME}) && $runnable"
  +      # Do not chroot if current user is APP_USER.
  +      if [ $(id -u) = $(id -u ${APP_USER}) ]; then
  +        exec sh -c "cd $(_p ${APP_HOME}) && $runnable"
  +      else
  +        exec chroot --userspec ${APP_USER}:${APP_GROUP} "/" sh -c "cd $(_p ${APP_HOME}) && $runnable"
  +      fi
   
         break ;;
   
       scale)
  +      ensure_root
  +
         shift
         for arg in "$@"; do
           [ "$arg" = "" ] && usage
  
positive.code:   exec $APP_HOME/bin/$APP_CLI "$@"
  fi
  
  if [ `id -u` -ne 0 ]; then
    echo "You must be executing with root privileges to launch commands."
    echo "Either log in as root, use sudo, or add sudo privileges for running ${APP_NAME} with your user."
    exit 1
  fi
  
  
negative.code:       break;;
  
      configure)
        ensure_root
  
        configure $@
        break;;
  
      reconfigure)
        ensure_root
  
        reconfigure $@
        break;;
  
  