Révision 60103d5a
Ajouté par Julien Enselme il y a plus de 10 ans
bin/scripts-utils.sh | ||
---|---|---|
99 | 99 |
cd $dir_multi_assos |
100 | 100 |
git commit -a -m "$1" |
101 | 101 |
} |
102 |
|
|
103 |
site_exists() { |
|
104 |
# Check if site database exists. |
|
105 |
if mysql --defaults-extra-file=$myassos_cnf -e "USE $d7_site_name" 2>/dev/null ; then |
|
106 |
echo "Database $d7_site_name already exists" |
|
107 |
exit 1 |
|
108 |
fi |
|
109 |
|
|
110 |
# Check if site folder already exists. |
|
111 |
if [ -d $d7_site_dir ] ; then |
|
112 |
echo "Folder $d7_site_dir already exists" |
|
113 |
exit 1 |
|
114 |
fi |
|
115 |
} |
Formats disponibles : Unified diff
Add a site_exists funcion to know whether a site exists or not.