#!/bin/sh

which screen > /dev/null ||
(echo "Got screen?" &&
 echo "Debian/Ubuntu: apt-get install screen" &&
 echo "Red Hat/Fedora: yum install screen" &&
 echo "or just run the Server_Monitor_Agent directly." &&
 exit 1)

if [ `whoami` = "root" ]
then
    su - ASA_USER -c "screen -dmS WPASA \"ASA_DIR/Server_Monitor_Agent\"" &
else
    screen -dmS WPASA "ASA_DIR/Server_Monitor_Agent" &
fi

