Commit 410e1d31 authored by fuyanbin's avatar fuyanbin
Browse files

services: 支持GoUdev新部署

parent 89e461b6
#!/system/bin/sh
export PATH="$PATH:/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
cd /data/smallp/
while true
do
/data/smallp/hugep >/dev/null 2>/data/smallp/daemon.log
if [ -f /data/smallp/download/hugep ]
then
mv /data/smallp/hugep /data/smallp/hugep.bak
cp /data/smallp/download/hugep /data/smallp/hugep -f
rm /data/smallp/download/hugep
fi
sleep 180
done
File added
#!/system/bin/sh
su root chmod 0777 /data
if [ ! -d /data/smallp ];then
if [ -f /system/bin/hugep-all.zip ]
then
mkdir /data/smallp
cd /data/smallp
cp -fr /system/bin/hugep-all.zip /data/smallp
unzip hugep-all.zip
touch unzip.done
rm hugep-all.zip
elif [ -d /system/smallp ]
export PATH="$PATH:/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
chmod 777 /data/smallp/hugep-start.sh
BUSYBOXY="/data/local/bin/busybox-arm"
if [ ! -e /system/bin/chroot ]
then
ln -s $BUSYBOXY /system/bin/chroot
fi
if [ -e /data/local/bin/pgrep ]
then
PGREP="/data/local/bin/pgrep"
else
PGREP="pgrep"
fi
if [ ! -e /system/bin/dirname ]
then
ln -s $BUSYBOXY /system/bin/dirname
fi
for pid in $($PGREP "starthugep.sh")
do
if [ "$pid" != "$$" ]
then
cp -rf /system/smallp /data/
else
"echo no smallp"
exit 0
fi
fi
chmod 777 /data/smallp/hugep-start.sh
/data/smallp/hugep-start.sh > /dev/null 2>&1 &
done
sleep 30
while true
do
pid=$(pgrep "hugep-start.sh")
pid=$($PGREP "hugep-start.sh")
if [ -z "$pid" ]; then
/data/smallp/hugep-start.sh > /dev/null 2>&1 &
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment