-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4script.sh
More file actions
executable file
·92 lines (50 loc) · 2.12 KB
/
4script.sh
File metadata and controls
executable file
·92 lines (50 loc) · 2.12 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
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
#!/bin/bash
ifconfig enp0s3 | grep 'inet' ; read -p "Antes de comecar, digite o ipv4 encontrado: " ipv4;
clear ; read -t 5 -p "PASSO 1: CRIAR DIRETORIOS EM /var/www USANDO MKDIR " ;
mkdir /var/www/html/edilton.gov ; mkdir /var/www/html/edilton.org ;
clear;
read -t 1 -p "PASSO 2: ADICIONAR UM ARQUIVO INDEX.HTML NOS DIRETORIOS CRIADOS " ;
echo "<html><h1> Site de Edilton ponto GOV ponto BR </h1></html>" > /var/www/html/edilton.gov/index.html ;
echo "<html><h1> Site de Edilton dot ORG </h1></html>" > /var/www/html/edilton.org/index.html ;
read -t 5 -p "";
clear ; read -t 5 -p "PASSO 3: CRIAR OS ARQUIVOS DE CONFIGURACAO DOS SITES EM /etc/apache2/sites-available " ;
echo "
#
#
<VirtualHost *>
ServerAdmin webmaster@www.edilton.gov.br
ServerName www.edilton.gov.br
ServerAlias edilton.gov.br
# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /home/www/html/edilton.gov
</VirtualHost>
" > /etc/apache2/sites-available/www.edilton.gov.br.conf ;
echo "
#
#
<VirtualHost *>
ServerAdmin webmaster@www.edilton.org
ServerName www.edilton.org
ServerAlias www.edilton.org
# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /home/www/html/www.edilton.org
</VirtualHost>
" > /etc/apache2/sites-available/www.edilton.org.conf ;
printf "\nOs arquivos .conf das paginas foram configurados nos respectivos diretorios:\n\n";
ls -d /etc/apache2/sites-available/*.conf;
read -t 5 -p "";
clear ; read -t 5 -p "PASSO 4: HABILITAR OS SITES E VERIFICAR SE FORAM HABILITADOS " ;
cd /etc/apache2/sites-available/ ; a2ensite www.edilton.org ; a2ensite www.edilton.gov.br ;
ls /etc/apache2/sites-enabled/ ;
read -t 5 -p "PASSO 5: REATIVAR O SERVIDOR DO APACHE " ;
/etc/init.d/apache2 reload ; read -t 1 -p"";
service apache2 stop; read -t 1 -p "";
service apache2 start;
read -t 5 -p "PASSO 6: CHECAR OS SITES NO NAVEGADOR " ;
elinks $ipv4/edilton.gov;
elinks $ipv4/edilton.org;
clear; read -p " MISSAO CUMPRIDA !!! " ;
clear ; read -t 5 -p "FIM" ;
clear ;