Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1401 2014-07-02 15:04:23Z richard $
|
2 |
# $Id: alcasar.sh 1410 2014-07-09 13:53:42Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 751... |
Line 751... |
751 |
ErrorDocument 404 https://$HOSTNAME.$DOMAIN/
|
751 |
ErrorDocument 404 https://$HOSTNAME.$DOMAIN/
|
752 |
</Directory>
|
752 |
</Directory>
|
753 |
EOF
|
753 |
EOF
|
754 |
# Launch after coova
|
754 |
# Launch after coova
|
755 |
$SED "s?^After=.*?After=network.target remote-fs.target nss-lookup.target chilli.service?g" /lib/systemd/system/httpd.service
|
755 |
$SED "s?^After=.*?After=network.target remote-fs.target nss-lookup.target chilli.service?g" /lib/systemd/system/httpd.service
|
- |
|
756 |
# Error page management
|
- |
|
757 |
FIC_ERROR_DOC=`find /etc/httpd/conf -type f -name multilang-errordoc.conf`
|
- |
|
758 |
[ -e $FIC_ERROR_DOC ] || cp $FIC_ERROR_DOC $FIC_ERROR_DOC.default
|
- |
|
759 |
|
- |
|
760 |
cat <<EOF > $FIC_ERROR_DOC
|
- |
|
761 |
Alias /error/ "/var/www/html/"
|
- |
|
762 |
|
- |
|
763 |
<Directory "/usr/share/httpd/error">
|
- |
|
764 |
AllowOverride None
|
- |
|
765 |
Options IncludesNoExec
|
- |
|
766 |
AddOutputFilter Includes html
|
- |
|
767 |
AddHandler type-map var
|
- |
|
768 |
Require all granted
|
- |
|
769 |
LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
|
- |
|
770 |
ForceLanguagePriority Prefer Fallback
|
- |
|
771 |
</Directory>
|
- |
|
772 |
|
- |
|
773 |
ErrorDocument 400 /error/error.php?error=400
|
- |
|
774 |
ErrorDocument 401 /error/error.php?error=401
|
- |
|
775 |
ErrorDocument 403 /error/error.php?error=403
|
- |
|
776 |
ErrorDocument 404 /error/error.php?error=404
|
- |
|
777 |
ErrorDocument 405 /error/error.php?error=405
|
- |
|
778 |
ErrorDocument 408 /error/error.php?error=408
|
- |
|
779 |
ErrorDocument 410 /error/error.php?error=410
|
- |
|
780 |
ErrorDocument 411 /error/error.php?error=411
|
- |
|
781 |
ErrorDocument 412 /error/error.php?error=412
|
- |
|
782 |
ErrorDocument 413 /error/error.php?error=413
|
- |
|
783 |
ErrorDocument 414 /error/error.php?error=414
|
- |
|
784 |
ErrorDocument 415 /error/error.php?error=415
|
- |
|
785 |
ErrorDocument 500 /error/error.php?error=500
|
- |
|
786 |
ErrorDocument 501 /error/error.php?error=501
|
- |
|
787 |
ErrorDocument 502 /error/error.php?error=502
|
- |
|
788 |
ErrorDocument 503 /error/error.php?error=503
|
- |
|
789 |
ErrorDocument 506 /error/error.php?error=506
|
- |
|
790 |
EOF
|
- |
|
791 |
|
756 |
} # End of ACC ()
|
792 |
} # End of ACC ()
|
757 |
|
793 |
|
758 |
##########################################################################################
|
794 |
##########################################################################################
|
759 |
## Fonction "CA" ##
|
795 |
## Fonction "CA" ##
|
760 |
## - Création d'une Autorité de Certification et du certificat serveur pour apache ##
|
796 |
## - Création d'une Autorité de Certification et du certificat serveur pour apache ##
|
Line 763... |
Line 799... |
763 |
{
|
799 |
{
|
764 |
$SED "s?ifcfg-eth.?ifcfg-$INTIF?g" $DIR_DEST_BIN/alcasar-CA.sh
|
800 |
$SED "s?ifcfg-eth.?ifcfg-$INTIF?g" $DIR_DEST_BIN/alcasar-CA.sh
|
765 |
$DIR_DEST_BIN/alcasar-CA.sh
|
801 |
$DIR_DEST_BIN/alcasar-CA.sh
|
766 |
FIC_VIRTUAL_SSL=`find /etc/httpd/conf -type f -name *default_ssl_vhost.conf`
|
802 |
FIC_VIRTUAL_SSL=`find /etc/httpd/conf -type f -name *default_ssl_vhost.conf`
|
767 |
[ -e /etc/httpd/conf/vhosts-ssl.default ] || cp $FIC_VIRTUAL_SSL /etc/httpd/conf/vhosts-ssl.default
|
803 |
[ -e /etc/httpd/conf/vhosts-ssl.default ] || cp $FIC_VIRTUAL_SSL /etc/httpd/conf/vhosts-ssl.default
|
- |
|
804 |
|
768 |
$SED "s?localhost.crt?alcasar.crt?g" $FIC_VIRTUAL_SSL
|
805 |
#$SED "s?localhost.crt?alcasar.crt?g" $FIC_VIRTUAL_SSL
|
769 |
$SED "s?localhost.key?alcasar.key?g" $FIC_VIRTUAL_SSL
|
806 |
#$SED "s?localhost.key?alcasar.key?g" $FIC_VIRTUAL_SSL
|
770 |
$SED "s?^#SSLCertificateChainFile.*?SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt?" $FIC_VIRTUAL_SSL
|
807 |
#$SED "s?^#SSLCertificateChainFile.*?SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt?" $FIC_VIRTUAL_SSL
|
- |
|
808 |
|
- |
|
809 |
cat <<EOF > $FIC_VIRTUAL_SSL
|
- |
|
810 |
# default SSL virtual host, used for all HTTPS requests that do not
|
- |
|
811 |
# match a ServerName or ServerAlias in any <VirtualHost> block.
|
- |
|
812 |
|
- |
|
813 |
<VirtualHost _default_:443>
|
- |
|
814 |
# general configuration
|
- |
|
815 |
ServerAdmin root@localhost
|
- |
|
816 |
ServerName localhost
|
- |
|
817 |
|
- |
|
818 |
# SSL configuration
|
- |
|
819 |
SSLEngine on
|
- |
|
820 |
SSLCertificateFile /etc/pki/tls/certs/alcasar.crt
|
- |
|
821 |
SSLCertificateKeyFile /etc/pki/tls/private/alcasar.key
|
- |
|
822 |
SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
|
- |
|
823 |
CustomLog logs/ssl_request_log \
|
- |
|
824 |
"%t %{SSL_PROTOCOL}x %{SSL_CIPHER}x [%h] \"%r\" %b"
|
- |
|
825 |
ErrorLog logs/ssl_error_log
|
- |
|
826 |
ErrorLogFormat "[%t] [%m:%l] [client %a] %M"
|
- |
|
827 |
</VirtualHost>
|
- |
|
828 |
EOF
|
- |
|
829 |
|
771 |
chown -R root:apache /etc/pki
|
830 |
chown -R root:apache /etc/pki
|
772 |
chmod -R 750 /etc/pki
|
831 |
chmod -R 750 /etc/pki
|
773 |
} # End of CA ()
|
832 |
} # End of CA ()
|
774 |
|
833 |
|
775 |
##########################################################################################
|
834 |
##########################################################################################
|
Line 1319... |
Line 1378... |
1319 |
$SED "s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1;'?g" /usr/libexec/NfSenRC.pm
|
1378 |
$SED "s?'\$ziparg $extensions.*?\$ziparg $extensions -b 127.0.0.1;'?g" /usr/libexec/NfSenRC.pm
|
1320 |
# expire delay for the profile "live"
|
1379 |
# expire delay for the profile "live"
|
1321 |
systemctl start nfsen
|
1380 |
systemctl start nfsen
|
1322 |
/bin/nfsen -m live -e 62d 2>/dev/null
|
1381 |
/bin/nfsen -m live -e 62d 2>/dev/null
|
1323 |
# add SURFmap plugin
|
1382 |
# add SURFmap plugin
|
1324 |
tar xzf $DIR_CONF/nfsen/SURFmap_v3.3b1.tar.gz -C /tmp/
|
1383 |
tar xzf $DIR_CONF/nfsen/SURFmap_v3.3.tar.gz -C /tmp/
|
1325 |
cd /tmp/SURFmap
|
1384 |
cd /tmp/SURFmap
|
1326 |
/usr/bin/sh install.sh
|
1385 |
/usr/bin/sh install.sh
|
1327 |
# clear the installation
|
1386 |
# clear the installation
|
1328 |
cd $DirTmp
|
1387 |
cd $DirTmp
|
1329 |
rm -rf /tmp/nfsen-1.3.6p1/
|
1388 |
rm -rf /tmp/nfsen-1.3.6p1/
|