Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (49 sloc) 1.33 KB
#!/bin/bash
####################################################################
# Prey Core Setup Routine - by Tomas Pollak (bootlog.org)
# URL: http://preyproject.com
# License: GPLv3
####################################################################
if [[ "$1" == "-t" || "$1" == "--test" ]]; then
echo -e "\n\033[1m -- TEST MODE ENABLED.\033[0m"
. $base_path/test/include 2> /dev/null
test_mode=1
fi
get_os(){
os=`lowercase \`uname\``
if [ "$os" == "windowsnt" ]; then
os=windows
else # linux/mac stuff
if [ "$os" == "darwin" ]; then
os=mac
fi
logged_user=`who | cut -d' ' -f1 | sort -u | tail -1`
readonly root_path='/'
readonly home_path=`eval echo ~`
fi
readonly os
readonly platform_path="$base_path/platform/$os"
PATH=$PATH:$platform_path/bin
}
set_vars(){
getter="curl -s"
tmpdir="/tmp/p${RANDOM}"
patcher='patch'
line_breaker="\n"
}
set_constants(){
readonly lang
readonly start_time=`date +"%F %T"`
readonly tmpdir
readonly logged_user
readonly getter
readonly mailsender="sendEmail"
readonly user_agent="-A Prey/$version ($os)"
readonly control_panel_url="http://control.preyproject.com" 2> /dev/null
readonly updates_url="http://cloud.github.com/downloads/tomas/prey" 2> /dev/null
readonly modules_url=$control_panel_url 2> /dev/null
}
get_os
set_vars
. "$platform_path/settings"
set_constants
Jump to Line
Something went wrong with that request. Please try again.