#!/bin/sh
if [ `id -u` != 0 ]; then echo "Please log in as root. To do this enter su, followed by alpine."; exit 0; fi  
dpkg -iREG /var/mobile/OpenBackupDebs/archives >/tmp/junk.log 2>>/tmp/openbackup.log
if [ -s /var/mobile/Library/Preferences/OpenBackupFiles/bckup.zip ]; then
rm -rf /etc/apt/sources.list.d/
fi
unzip -o -X -K /var/mobile/Library/Preferences/OpenBackupFiles/bckup.zip -d /
cp /var/mobile/Library/Preferences/com.zokunei.openbackup.plist /System/Library/LaunchDaemons
chmod 644 /System/Library/LaunchDaemons/com.zokunei.openbackup.plist
rm /tmp/junk.log