-
Notifications
You must be signed in to change notification settings - Fork 2
/
update_linux_system.sh
112 lines (80 loc) · 3.1 KB
/
update_linux_system.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/bash
#--------------------------Script color requiments--------------------------------#
#--------------------------PLEASE DO NOT REMOVE THIS------------------------------#
success_color='\033[1;32m' #green
primary_color='\033[1;97;4m' #Bold white underlined
secondary_color='\033[1;37m' #Bold white
reset_color='\033[0m'
#--------------------------Introduction-------------------------------------------#
#--------------------------PLEASE DO NOT REMOVE THIS------------------------------#
started=$(date)
echo "" >> ./linux_system_update.sh
echo "# update started at "$(date) >> ./linux_system_update.sh
clear
echo -e ${primary_color}
echo "***** Linux System Update *****"
echo -e ${reset_color}
sleep 2
echo ""
#---------------------------------------------------------------------------------#
echo -e ${secondary_color}
echo "[ STEP 0 of 3 ] sudo dpkg --configure -a"
echo -e ${reset_color}
echo ""
echo $PASS | sudo -S dpkg --configure -a
echo ""
echo -e ${success_color}
echo "[ STEP 0 of 3 ] sudo dpkg --configure -a... fnished! at "$(date)
echo -e ${reset_color}
echo ""
#---------------------------------------------------------------------------------#
echo -e ${secondary_color}
echo "[ STEP 1 of 3 ] sudo do-release-upgrade... envoked!"
echo -e ${reset_color}
echo ""
echo $PASS | sudo -S do-release-upgrade
echo ""
echo -e ${success_color}
echo "[ STEP 1 of 3 ] sudo do-release-upgrade... finished! at "$(date)
echo -e ${reset_color}
echo ""
#---------------------------------------------------------------------------------#
echo -e ${secondary_color}
echo "[ STEP 2 of 3 ] sudo apt-get update... envoked!"
echo -e ${reset_color}
echo ""
echo $PASS | sudo -S apt-get update
echo ""
echo -e ${success_color}
echo "[ STEP 2 of 3 ] sudo apt-get update.. finished! at "$(date)
echo -e ${reset_color}
echo ""
#---------------------------------------------------------------------------------#
echo -e ${secondary_color}
echo "[ STEP 3 of 3 ] sudo apt-get upgrade... envoked!"
echo -e ${reset_color}
echo ""
echo $PASSS | sudo -S apt-get -yf upgrade
echo ""
echo -e ${success_color}
echo "[ STEP 3 of 3 ] sudo apt-get upgrade... finished! at "$(date)
echo -e ${reset_color}
echo ""
#---------------------------------------------------------------------------------#
echo ""
echo -e ${secondary_color}
echo "[ All Steps Completed Successfully!!!! ]"
echo "started at $started , and ended at "$(date)
echo -e ${reset_color}
echo ""
#---------------------------------------------------------------------------------#
#-------------------------Srcipt Execution Log------------------------------------#
echo "# update ended at "$(date) >> ./linux_system_update.sh
echo "" >> ./linux_system_update.sh
#--------------------------PLEASE DO NOT REMOVE THIS------------------------------#
# update started at Sun Feb 7 18:37:44 SAST 2021
# update ended at Sun Feb 7 18:39:56 SAST 2021
# update started at Sun Feb 7 18:48:44 SAST 2021
# update ended at Sun Feb 7 18:50:44 SAST 2021
# update started at Sun Feb 7 18:56:15 SAST 2021
# update ended at Sun Feb 7 18:58:15 SAST 2021