[fix] Allow to use a remote sql server even if a local one is installed
This commit is contained in:
		
							parent
							
								
									c8cfbdf426
								
							
						
					
					
						commit
						bb26c2f13c
					
				|  | @ -104,7 +104,7 @@ SQLBACKUP_TYPE="rotate" | ||||||
| SQLBACKUP_OVERWRITE="no" | SQLBACKUP_OVERWRITE="no" | ||||||
| QUEST_STATE=1 | QUEST_STATE=1 | ||||||
| 
 | 
 | ||||||
| while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 13 ]; do | while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do | ||||||
|   case "$QUEST_STATE" in |   case "$QUEST_STATE" in | ||||||
|   1) |   1) | ||||||
|     if [ -r /etc/alternc/local.sh ]; then |     if [ -r /etc/alternc/local.sh ]; then | ||||||
|  | @ -210,19 +210,22 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 13 ]; do | ||||||
|   8) |   8) | ||||||
|     if [ "`mysql --defaults-file=/etc/mysql/debian.cnf -Bse 'SELECT "OK";' 2>/dev/null`" = "OK" ]; then |     if [ "`mysql --defaults-file=/etc/mysql/debian.cnf -Bse 'SELECT "OK";' 2>/dev/null`" = "OK" ]; then | ||||||
|       db_input critical alternc/use_local_mysql || true |       db_input critical alternc/use_local_mysql || true | ||||||
|     else |  | ||||||
|       db_input critical alternc/use_remote_mysql || true |  | ||||||
|     fi |     fi | ||||||
|   ;; |   ;; | ||||||
|   9) |   9) | ||||||
|     db_get alternc/use_local_mysql || true |     db_get alternc/use_local_mysql | ||||||
|     if [ -z "$RET" -o "$RET" == "false" ] |     if [ "$RET" != "true" ]; then | ||||||
|       then |       db_input critical alternc/use_remote_mysql || true | ||||||
|       #user want to use a remote server |  | ||||||
|       check_mysql |  | ||||||
|     fi |     fi | ||||||
|   ;; |   ;; | ||||||
|   10) |   10) | ||||||
|  |     db_get alternc/use_remote_mysql | ||||||
|  |     if [ "$RET" == "true" ]; then | ||||||
|  |       # user want to use a remote server | ||||||
|  |       check_mysql | ||||||
|  |     fi | ||||||
|  |   ;; | ||||||
|  |   11) | ||||||
|     # We need to set the alternc_location here because we have to test for quotas and acls |     # We need to set the alternc_location here because we have to test for quotas and acls | ||||||
| 
 | 
 | ||||||
|     db_get alternc/alternc_html |     db_get alternc/alternc_html | ||||||
|  | @ -259,14 +262,14 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 13 ]; do | ||||||
|       fi |       fi | ||||||
|     ) |     ) | ||||||
|   ;; |   ;; | ||||||
|   11) |   12) | ||||||
|     db_get alternc/alternc_mail |     db_get alternc/alternc_mail | ||||||
|     if [ -z "$RET" ]; then |     if [ -z "$RET" ]; then | ||||||
|       db_set alternc/alternc_mail $ALTERNC_MAIL |       db_set alternc/alternc_mail $ALTERNC_MAIL | ||||||
|       db_input high alternc/alternc_mail |       db_input high alternc/alternc_mail | ||||||
|     fi |     fi | ||||||
|   ;; |   ;; | ||||||
|   12) |   13) | ||||||
|     db_get alternc/alternc_logs |     db_get alternc/alternc_logs | ||||||
|     if [ -z "$RET" ];then |     if [ -z "$RET" ];then | ||||||
|       db_set alternc/alternc_logs $ALTERNC_LOGS |       db_set alternc/alternc_logs $ALTERNC_LOGS | ||||||
|  |  | ||||||
|  | @ -238,7 +238,6 @@ _Description: Use locally found MySQL server? | ||||||
| Template: alternc/use_remote_mysql | Template: alternc/use_remote_mysql | ||||||
| Type: boolean | Type: boolean | ||||||
| _Description: Use a remote MySQL server? | _Description: Use a remote MySQL server? | ||||||
|  No local Mysql server was found. |  | ||||||
|  Please confirm you want to use a remote Mysql Server. |  Please confirm you want to use a remote Mysql Server. | ||||||
|  If not, AlternC cannot be installed. |  If not, AlternC cannot be installed. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Pierre-Louis Bonicoli
						Pierre-Louis Bonicoli