Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #PREY 0.6.2 automated installer for PowerPC
- #This script was desiged to install http://www.preyproject.com
- #Anti-theft software on older PowerPC computers running OSX
- #Download the batch installer from http://preyproject.com/releases/current/prey-0.6.2-mac-batch.mpkg.zip
- # & run this script from same directory as batch installer
- DIR_1=/usr/share/curl
- echo ""
- echo " ## Watch as PREY 0.6.2 gracefully spreads its wings on your old PowerPC!"
- echo " ## $(uname -n) $(uname -s) $(uname -r) $(uname -m) $(uname -p)"
- echo " ## $(date)"
- echo ""
- if [ $(find "$DIR_1" -name old.curl-ca-bundle.crt |wc -l) -eq 0 ]; then
- echo " ## I'll bet that your certificate-bundle is outdated!";
- echo " ## They're required in order to establish a connection.";
- echo " ## I will take the liberty of updating them for you.";
- echo " ## Only good should come from this :)";
- echo ""
- curl http://curl.haxx.se/ca/cacert.pem -o /usr/share/curl/new_cacert.pem;
- echo ""
- while true
- do
- read -r -p ' ## Would you like me to continue? ' choice
- case "$choice" in
- n|N|no|No|NO) echo " ## Aw Snap! PREY might not like that :(";
- break;;
- y|Y|yes|yes|Yes|YEs|YES|YeS|yeS|yES) echo " ## I think you made the right choice :)";
- mv $DIR_1/curl-ca-bundle.crt $DIR_1/old.curl-ca-bundle.crt;
- echo "";
- mv "$DIR_1"/new_cacert.pem "$DIR_1"/curl-ca-bundle.crt;
- break;;
- *) echo ' ## Not a valid response!';;
- esac
- done
- fi
- echo ""
- read -p " ## Please provide your API Key:" INPUT_API_KEY
- while [[ -z "$INPUT_API_KEY" ]]; do
- echo "";
- echo " API Key can't be blank, you can find it at:";
- echo " https://panel.preyproject.com/profile";
- echo ""
- read -s -p " Please provide your API Key:" INPUT_API_KEY;
- echo "";
- done
- export API_KEY="$INPUT_API_KEY"
- installer -pkg ./prey-0.6.2-mac-batch.mpkg -target / && /usr/share/prey/prey.sh -c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement