#!/bin/bash
#
# This script starts wellenreiter and attempts to make the users life easier
#
# Kill any stale processes
ps -eo pid,args | egrep -v 'grep|bash'| grep wellenreiter | while read pid args; do
  sudo kill $pid
done

  
sleep 1

# Activate the card configuration
cardctl scheme qpewlan0
cardctl reset
sleep 1

# Launch wellenreiter as root
sudo /opt/QtPalmtop/share/wellenreiter/wellenreiter

# Deactivate the card configuration
cardctl scheme CardSuspended
