| Line 1... | 
            Line 1... | 
          
          
            | 1 | 
            #!/bin/bash
  | 
            1 | 
            #!/bin/bash
  | 
          
          
            | 2 | 
            # $Id: alcasar-https.sh 3293 2025-07-16 22:50:45Z rexy $
  | 
            2 | 
            # $Id: alcasar-https.sh 3294 2025-07-20 22:26:38Z rexy $
  | 
          
          
            | 3 | 
             
  | 
            3 | 
             
  | 
          
          
            | 4 | 
            # alcasar-https.sh
  | 
            4 | 
            # alcasar-https.sh
  | 
          
          
            | 5 | 
            # by Rexy
  | 
            5 | 
            # by Rexy
  | 
          
          
            | 6 | 
            # This script is distributed under the Gnu General Public License (GPL)
  | 
            6 | 
            # This script is distributed under the Gnu General Public License (GPL)
  | 
          
          
            | 7 | 
             
  | 
            7 | 
             
  | 
          
          
            | Line 46... | 
            Line 46... | 
          
          
            | 46 | 
            		$SED "s?^HTTPS_CHILLI=.*?HTTPS_CHILLI=on?" $CONF_FILE
  | 
            46 | 
            		$SED "s?^HTTPS_CHILLI=.*?HTTPS_CHILLI=on?" $CONF_FILE
  | 
          
          
            | 47 | 
            		$SED "s?^uamserver.*?uamserver\thttps://$HOSTNAME.$DOMAIN/intercept.php?" $CHILLI_CONF_FILE
  | 
            47 | 
            		$SED "s?^uamserver.*?uamserver\thttps://$HOSTNAME.$DOMAIN/intercept.php?" $CHILLI_CONF_FILE
  | 
          
          
            | 48 | 
            		$SED "s?^#redirssl.*?redirssl?" $CHILLI_CONF_FILE
  | 
            48 | 
            		$SED "s?^#redirssl.*?redirssl?" $CHILLI_CONF_FILE
  | 
          
          
            | 49 | 
            		$SED "s?^#uamuissl.*?uamuissl?" $CHILLI_CONF_FILE
  | 
            49 | 
            		$SED "s?^#uamuissl.*?uamuissl?" $CHILLI_CONF_FILE
  | 
          
          
            | 50 | 
            		/usr/bin/systemctl restart chilli
  | 
            50 | 
            		/usr/bin/systemctl restart chilli
  | 
          
          
            | 51 | 
            		$SED "/<Directory \/var\/www\/html>/{n;/SSLRequireSSL/{d;};}" $HTTPD_CONF_FILE # if already exist
  | 
            51 | 
            		$SED "/<Directory \/var\/www\/html>/{n;/SSLRequireSSL/{d;};}" $HTTPD_CONF_FILE # remove if already exist
  | 
          
          
            | 52 | 
            		$SED "/<Directory \/var\/www\/html>/a\        SSLRequireSSL" $HTTPD_CONF_FILE
  | 
            52 | 
            		$SED "/<Directory \/var\/www\/html>/a\        SSLRequireSSL" $HTTPD_CONF_FILE
  | 
          
          
            | 53 | 
            		$SED "/redirect/d" $HTTPD_80_CONF_FILE # if already exist
  | 
            53 | 
            		$SED "/redirect/d" $HTTPD_80_CONF_FILE # remove if already exist
  | 
          
          
            | 54 | 
            		$SED "/<\/VirtualHost>/i\    redirect permanent \/ https:\/\/$HOSTNAME.$DOMAIN" $HTTPD_80_CONF_FILE
  | 
            54 | 
            		$SED "/<\/VirtualHost>/i\    redirect permanent \/ https:\/\/$HOSTNAME.$DOMAIN" $HTTPD_80_CONF_FILE
  | 
          
          
            | 55 | 
            		/usr/bin/systemctl restart httpd
  | 
            55 | 
            		/usr/bin/systemctl restart httpd
  | 
          
          
            | 56 | 
            		;;
  | 
            56 | 
            		;;
  | 
          
          
            | 57 | 
            	*)
  | 
            57 | 
            	*)
  | 
          
          
            | 58 | 
            		echo "Argument inconnu : $1"
  | 
            58 | 
            		echo "Argument inconnu : $1"
  |