Skip to content

Commit

Permalink
[Cloud Experiment] Minor changes to apps executed when cloud disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
alienatedsec committed Jun 28, 2023
1 parent f0d3425 commit 00f7678
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/static/static/home/yi-hack-v5/script/cloudAPI
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ export LD_LIBRARY_PATH=/home/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/tmp/sd/yi-hack-v5/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/app/locallib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/hisiko/hisilib:$LD_LIBRARY_PATH
export PATH=/home/app:$PATH
export PATH=/home/app/localbin:$PATH
export PATH=/home/base/tools:$PATH
export PATH=/tmp/sd/yi-hack-v5/bin:$PATH
export PATH=/tmp/sd/yi-hack-v5/sbin:$PATH

CONF_FILE="etc/system.conf"
if [ -d "/tmp/sd/yi-hack-v5" ]; then
Expand All @@ -22,11 +25,13 @@ get_config()
}

if [[ $(get_config DISABLE_CLOUD) == "yes" ]] ; then
./cloudAPI_fake "$@"
cd /home/app
./cloudAPI_fake "$@"
else
if [[ $(get_config PROXYCHAINSNG) == "yes" ]] ; then
$YI_HACK_V5_PREFIX/bin/proxychains4 ./cloudAPI_real "$@"
$YI_HACK_V5_PREFIX/bin/proxychains4 ./home/app/cloudAPI_real "$@"
else
cd /home/app
./cloudAPI_real "$@"
fi
fi
3 changes: 2 additions & 1 deletion src/static/static/home/yi-hack-v5/script/cloudAPI_fake
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ elif [ "$c" = "136" ]; then
else
NTP_SERVER="pool.ntp.org"
fi
$YI_HACK_V5_PREFIX/usr/sbin/ntpd -p $NTP_SERVER -n -q
#$YI_HACK_V5_PREFIX/usr/sbin/ntpd -p $NTP_SERVER -n -q <<< ntpd part of busybox in v5
ntpd -p $NTP_SERVER -n -q
echo '{"code":"20000","time":'$(date +%s)'000}'
elif [ "$c" = "141" ]; then
#CMD_do_tnp_on_line
Expand Down
17 changes: 17 additions & 0 deletions src/static/static/home/yi-hack-v5/script/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,23 @@ if [[ $(get_config DISABLE_CLOUD) == "no" ]] ; then
fi
./watch_process &
)
fi
if [[ $(get_config DISABLE_CLOUD) == "yes" ]] ; then
(
cd /home/app
killall dispatch
LD_PRELOAD=/home/yi-hack-v5/lib/ipc_multiplex.so ./dispatch &
sleep 2
LD_LIBRARY_PATH="/home/yi-hack-v5/lib:/lib:/home/lib:/home/app/locallib:/home/hisiko/hisilib" ./rmm &
sleep 4
./mp4record &
./cloud &
#./p2p_tnp & <<< is this needed? It feels like those 5 seconds previews
if [[ $(cat /home/app/.camver) != "yi_dome" ]] ; then
./oss & #not sure what is oss
fi
#./watch_process & <<< this makes sure all other services that we removed are working so not needed
)
elif [[ $(get_config REC_WITHOUT_CLOUD) == "yes" ]] ; then
(
cd /home/app
Expand Down

0 comments on commit 00f7678

Please sign in to comment.