Advertisement
marcoshalano

update-prey-1.2

Apr 1st, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Instructions
  4. # Just put this script on /etc/cron.daily and set eXecute permission
  5.  
  6. # ChangeLog
  7. # Removed the move/un-move part because there is no need now. Prey supports Systemd in a good way.
  8.  
  9. ARCH=amd64
  10. CURRENT_VERSION=$(dpkg-query -W -f='${Version}\n' prey)
  11. PACKAGE_VERSION=$(curl -s https://s3.amazonaws.com/prey-releases/node-client/latest.txt)
  12. if [ "$CURRENT_VERSION" != "$PACKAGE_VERSION" ]; then
  13. wget -q -O"/tmp/prey.deb" https://s3.amazonaws.com/prey-releases/node-client/"$PACKAGE_VERSION"/prey_"$PACKAGE_VERSION"_$ARCH.deb
  14. dpkg -i /tmp/prey.deb >/dev/null 2>/dev/null
  15. rm -f /tmp/prey.deb
  16. logger "Prey Auto-Theft updated from $CURRENT_VERSION to $PACKAGE_VERSION"
  17. fi
  18. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement