echo"Veuillez saisir la commande suivante sur le serveur sql distant, puis validez"
echo"Veuillez saisir la commande suivante sur le serveur sql distant, puis validez"
echo$sql_command
echo$mysql_command
while true;do
while true;do
read-p"Continue (y/n)?" choice
read-p"Continue (y/n)?" choice
case"$choice"in
case"$choice"in
...
@@ -235,13 +239,29 @@ then
...
@@ -235,13 +239,29 @@ then
esac
esac
done
done
fi
fi
apt-get -yinstall python3-mysqldb mysql-client
else
else
apt-get -yinstall postgresql-client
apt-get -yinstall python3-psycopg2
if[$sql_is_local== 1 ]
if[$sql_is_local== 1 ]
then
then
apt-get -yinstall postgresql-server
apt-get -yinstall postgresql
sudo-u postgres psql --command="$pgsql_command1"
sudo-u postgres psql --command="$pgsql_command2"
sudo-u postgres psql --command="$pgsql_command3"
else
echo"Veuillez saisir la commande suivante sur le serveur sql distant, puis validez"
echo sudo-u postgres psql $pgsql_command1
echo sudo-u postgres psql $pgsql_command2
echo sudo-u postgres psql $pgsql_command3
while true;do
read-p"Continue (y/n)?" choice
case"$choice"in
y|Y )break;;
n|N )exit;;
*)echo"invalid";;
esac
done
fi
fi
apt-get -yinstall postgresql-client
fi
fi
if[$ldap_is_local== 1 ]
if[$ldap_is_local== 1 ]
...
@@ -259,6 +279,12 @@ echo "Ecriture de settings_local"
...
@@ -259,6 +279,12 @@ echo "Ecriture de settings_local"
django_secret_key=$(python -c"import random; print(''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%=+') for i in range(50)]))")
django_secret_key=$(python -c"import random; print(''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%=+') for i in range(50)]))")