View Single Post
Old 02-05-2020, 03:41 AM   #4
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 802
Karma: 628976
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
Pocketor&Bookmarks

Got the bookmarks changing working by changing the startup script:
PockeTor.app
Code:
#!/bin/sh
BOOKMARKS=/mnt/ext1/system/browser.sqlite
mv $BOOKMARKS $BOOKMARKS.standard
if [ -f "$BOOKMARKS.tor" ]; then \cp $BOOKMARKS.tor $BOOKMARKS; fi
 
DIR=$(dirname "$0")/pocketor
if ! sudo /sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0 up; then
	if ! /mnt/secure/su /sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0 up; then
		dialog 3 "" "Your device doesn't support loopback interface. You'll need to root it." "OK"
		exit
	fi
fi

echo "PockeTor starting" > $DIR/notices.txt
$DIR/tor -f $DIR/torrc
export LD_PRELOAD=$DIR/proxy.so
export GET_PROXY=socks5://127.0.0.1:1080
export SET_APPNAME=PockeTor
function monitor() {
	while [ -e /proc/$1 ]; do
		sleep 1
	done
  \cp $BOOKMARKS $BOOKMARKS.tor
  \cp $BOOKMARKS.standard $BOOKMARKS
	killall tor
}
monitor $$ &
exec /ebrmain/bin/browser.app file://$DIR/start.html

Last edited by nhedgehog; 02-05-2020 at 10:04 AM. Reason: Found solution
nhedgehog is offline   Reply With Quote