If you have to tailor these files for a specific need (for example, if you don't install Trackbird client in the default location), we will detail the content of these differents files.
Open a terminal and type :
$ cd ~/Desktop/trackbird_macx_remove
$ ls
trackbird_macx_remove.app trackbird_macx_remove.sh
trackbird_macx_remove.scpt
In order to edit the script "trackbird_macx_remove.scpt", double clic on the file icon to launch the application "Script Editor".
or
Open a terminal and type :
$ cd /Applications/AppleScript
$ open Script\ Editor.app ~/Desktop/trackbird_macx_remove/trackbird_macx_remove.scpt
or
Open a terminal and type :
$ open /Applications/AppleScript/Script\ Editor.app ~/ Desktop/trackbird_macx_remove/trackbird_macx_remove.scpt
The content of the file "trackbird_macx_remove.scpt" is :
tell application "Terminal"
activate
-- Change the directory to "Desktop/trackbird_macx_remove"
-- Make sure the script shell "trackbird_remove.sh" is executable
-- Launch the script shell with admin privileges
do script "cd ~/Desktop/trackbird_macx_remove
chmod a+x trackbird_macx_remove.sh
sudo ./trackbird_macx_remove.sh"
end tell
In order to edit the script "trackbird_macx_remove.sh", open a terminal and type :
$ emacs ~/Desktop/trackbird_macx_remove/trackbird_macx_remove.sh
or
$ pico ~/Desktop/trackbird_macx_remove/trackbird_macx_remove.sh
The content of the file "trackbird_macx_remove.sh" is :
#! /bin/sh
# trackbird_remove - This script stops and uninstalls the TrackBird client on the local machine.
#
# Author: Nicolas Goubaux et Philippe Laval (ASG - http://www.asg.com/)
# Date: 5 March 2005
#
kill_proc()
{
ps_cmd=`ps auxww | grep $1 | grep -v grep`
pid_cmd=`echo $ps_cmd | awk '{print $2}'`
#echo $pid_cmd
if [ "$pid_cmd" != "" ] ; then
kill -9 $pid_cmd
#else
# echo "$1 not found"
fi
}
# Stop the TrackBird daemon.
#
kill_proc nbimacx
kill_proc nbdmacx
# Stop the TrackBird collector application.
#
kill_proc nbcmacx
# Stop the TrackBird agent application.
#
kill_proc nbamacx
kill_proc nbumacx
# Stop the TrackBird monitoring application.
#
kill_proc nbmmacx
# Remove the daemon script files.
#
rm -rf /System/Library/StartupItems/nbimacx_script
# PLL : We have changed the script location to /System/Library/StartupItems/nbimacx_script for Mac OS X Server compatibility
#
# The old script was there. Remove it just in case of an old installation.
rm -rf /Library/StartupItems/nbimacx_script
# Remove all TrackBird files from the default install location.
#
rm -rf /Library/Application\ Support/tbclient