Projet

Général

Profil

Révision a1a003de

Ajouté par Florent Torregrosa il y a environ 10 ans

#364 : Script to change http to https in settings.local.php

Voir les différences:

other-scripts/one-use/d7-all-settings-local-https.sh
1
#!/bin/sh
2

  
3
. /users/guest/assos/bin/scripts-config.sh
4
. /users/guest/assos/bin/scripts-utils.sh
5

  
6
# This script change the base URL to switch from http to https.
7

  
8
for local_settings in $(find $d7_dir_sites -mindepth 2 -maxdepth 2 -name settings.local.php) ; do
9
    # Go into the site repository.
10
    settings_dir=`give_dir $local_settings`
11
    cd $settings_dir
12

  
13
    chmod 700 settings.local.php
14

  
15
    # Need to use a tmp file.
16
    cp settings.local.php settings.local.tmp.php
17
    sed "s/http/https/" < settings.local.tmp.php > settings.local.php
18
    rm settings.local.tmp.php
19

  
20
    chmod 400 settings.local.php
21
done

Formats disponibles : Unified diff