-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path046.mainRestore
executable file
·50 lines (26 loc) · 931 Bytes
/
046.mainRestore
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
#!/bin/bash
##RESTORE
####Restore content
#echo Executed
#read
####1.sources.list.d
sudo cp -r ~/.ubunsys/backups/main/sources.list.d/* /etc/apt/sources.list.d
####2.sources.list
sudo cp ~/.ubunsys/backups/main/sources.list /etc/apt/sources.list
####3.sudoers.d
sudo cp -r ~/.ubunsys/backups/main/sudoers.d/* /etc/sudoers.d
####4.hosts
sudo cp ~/.ubunsys/backups/main/hosts /etc/hosts
####5.sudoers
sudo cp ~/.ubunsys/backups/main/sudoers /etc/sudoers
####6.templates
sudo cp -r ~/.ubunsys/backups/main/Plantillas/* ~/Plantillas/ 2>/dev/null || :
sudo chown -R $USER ~/Plantillas
#sudo chmod -R 775 ~/Plantillas
sudo cp ~/.ubunsys/backups/main/Templates/* ~/Templates/ 2>/dev/null || :
sudo chown -R $USER ~/Templates
#sudo chmod -R 775 ~/Templates
####7.rc.local
test -f ~/.ubunsys/backups/main/rc.local || sudo cp ~/.ubunsys/backups/main/rc.local /etc/rc.local
#Erase
sudo rm -r ~/.ubunsys/backups/main/*