#!/bin/sh #----------------------------------------------------------------------------- # /var/install/bin/vmail-tools-import # # Copyright (c) 2004 Jens Vehlhaber # # Creation: 2006-04-22 jv # Last Update: $Id: vmail-tools-import 9973 2007-04-16 13:25:41Z jv $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #----------------------------------------------------------------------------- passwd=`grep passwd= /var/lib/mysql/backup.pwd | sed 's/passwd=//'` p1="$1" if [ ! -z "$p1" ] then mysql -u backup -p${passwd} < ${p1} if [ $? -eq 1 ] then exit 1 else exit 0 fi fi /var/install/bin/list-files.cui -t "Select SQL file from /tmp"\ -c "Import from:"\ -p /tmp \ -f "*.sql" \ -o 1 -d -n -w \ -s "/var/install/bin/vmail-tools-import" \ --helpfile=/var/install/help/vmail \ --helpname=VMAIL_MENU_IMPORT \ --helpview ### ------------------------------------------------------------------------- exit 0