#!/bin/bash
####################################################################
# Prey Secure Module - by Tomas Pollak (bootlog.org)
# URL: http://preyproject.com
# License: GPLv3
####################################################################

# AFAIK windows doesnt have a keychain as linux and Mac do...
if [[ "$secure__delete_credentials" == 'y' && "$os" != "windows" ]]; then
	secure_folder "${credentials_path}"
fi

if [ "$secure__delete_firefox_data" == 'y' ]; then
	secure_folder "$firefox_path" 'firefox'
fi

if [ "$secure__delete_chrome_data" == 'y' ]; then
	secure_folder "$chrome_path" 'chrome'
	if [ "$os" == "linux" ]; then
		secure_folder "$chromium_path" 'chromium-browser'
	fi
fi

# Prey currently handles Safari only in Mac/Windows, not in other environments such as Wine. Sorry. :)
if [[ "$secure__delete_safari_data" == 'y' && "$os" != 'linux' ]]; then
	secure_folder "$safari_path" 'safari'
fi

if [ "$secure__hide_thunderbird_data" == 'y' ]; then
	secure_folder "$thunderbird_path" 'thunderbird'
fi

if [ "$os" == "windows" ]; then

	if [ "$secure__hide_outlook_data" == 'y' &&  ]; then
		secure_folder "$outlook_path" 'outlook'
	fi

	# Prey currently handles IE among Windows, not in other environments such as Wine. Sorry. :)
	if [ "$secure__delete_ie_data" == 'y' ]; then
		secure_ie_data
	fi

fi
