starthugep.sh 689 Bytes
Newer Older
fuyanbin's avatar
fuyanbin committed
1
#!/system/bin/sh
2
3

su root chmod 0777 /data
牛文敏's avatar
牛文敏 committed
4
if [ ! -d /data/smallp ];then
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    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 ]
    then
        cp -rf /system/smallp /data/
    else
        "echo no smallp"
    fi
牛文敏's avatar
牛文敏 committed
19
fi
fuyanbin's avatar
fuyanbin committed
20
21
22
23
24
25
26
27
28
29
30
chmod 777 /data/smallp/hugep-start.sh
/data/smallp/hugep-start.sh  > /dev/null 2>&1 &

while true
do
        pid=$(pgrep "hugep-start.sh")
        if [ -z "$pid" ]; then
            /data/smallp/hugep-start.sh  > /dev/null 2>&1 &
        fi
        sleep 30
done