-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfsystem.sh~
More file actions
executable file
·55 lines (40 loc) · 1.01 KB
/
confsystem.sh~
File metadata and controls
executable file
·55 lines (40 loc) · 1.01 KB
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
#!/bin/bash
#chmod +x run.sh
repliport=30005
dirport=20005
managerport=40002
echo "#DIRECTORIES" >> myfile.txt
echo "$1" >> myfile.txt
for i in {0..1}
do
STRDir="Directory_"
STRDir+=$i;
dirport=$(($dirport + $i))
echo "$2 dirport " >> myfile.txt
cp -rf Directory/ System/$STRDir
gnome-terminal -x sh -c "cd System/$STRDir ; ./dir -p $dirport; cat"
done
echo "#REPLICAS" >> myfile.txt
echo "$1" >> myfile.txt
for i in {0..1}
do
STRRep="Replica_"
STRRep+=$i;
repliport=$(($repliport + $i))
cp -rf Replica/ System/$STRRep
gnome-terminal -x sh -c "cd System/$STRRep ; ./repli -p $repliport; cat"
done
echo "#FILEMANAGERS" >> myfile.txt
echo "$1" >> myfile.txt
for i in {0..1}
do
STRManager="FileManager_"
STRManager+=$i;
managerport=$(($managerport + $i))
cp -rf FileManager/ System/$STRManager
gnome-terminal -x sh -c "cd System/$STRManager ; ./fil -p $managerport; cat"
done
echo "#PERMISSION" >> myfile.txt
echo "L0" >> myfile.txt
echo 'Script run'
exit