-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoUpdate.sh
57 lines (45 loc) · 1020 Bytes
/
autoUpdate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
if [ -d /be/ ]
then
echo "folder /be/ already created "
else
mkdir /be/
fi
if [ -f /media/external/autoUpdate/mountKey.sh ]
then
cp /media/external/autoUpdate/mountKey.sh /be/
chmod 777 /be/mountKey.sh
echo "mountKey updated"
else
echo "moutKey.sh doesn't exist"
fi
if [ -f /media/external/autoUpdate/encrypt ]
then
cp /media/external/autoUpdate/encrypt /be/
chmod 777 /be/encrypt
echo "encrypt updated"
else
echo "encrypt doesn't exist"
fi
if [ -f /media/external/autoUpdate/decrypt ]
then
cp /media/external/autoUpdate/decrypt /be/
chmod 777 /be/decrypt
echo "decrypt updated"
else
echo "decrypt doesn't exist"
fi
if [ -f /media/external/autoUpdate/S99mount ]
then
cp /media/external/autoUpdate/S99mount /etc/init.d/S99mount
chmod 777 /etc/init.d/S99mount
echo "S99mount updated"
else
echo "S99mount doesn't exist"
fi
sync
echo "update done"
rm /media/external/autoUpdate/autoUpdate.sh
echo "rebooting..."
sleep 2
reboot