WIP
This commit is contained in:
parent
5bd4b9b781
commit
440e9df633
16
malias.py
16
malias.py
@ -48,8 +48,9 @@ def connect_database():
|
||||
api text NOT NULL)''')
|
||||
c.execute('''CREATE TABLE IF NOT EXISTS settings (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
first_run INTEGER DEFAULT 0,
|
||||
server TEXT DEFAULT "TEST"
|
||||
first_run INTEGER,
|
||||
server TEXT,
|
||||
data_copy INTEGER"
|
||||
)''')
|
||||
c.execute('''CREATE TABLE IF NOT EXISTS aliases
|
||||
(id integer NOT NULL PRIMARY KEY,
|
||||
@ -151,6 +152,12 @@ def delete(alias):
|
||||
print('Delete : ' + alias)
|
||||
|
||||
|
||||
|
||||
|
||||
def copy_data():
|
||||
print('copy')
|
||||
|
||||
|
||||
def checklist(alias):
|
||||
apikey = get_api()
|
||||
mail_server = get_settings('mail_server')
|
||||
@ -267,6 +274,9 @@ parser.add_argument('-a', '--add', help='Add new alias.\n\n',
|
||||
parser.add_argument('-v', '--version', help='Show current version and config info\n\n',
|
||||
required=False, action='store_true')
|
||||
|
||||
parser.add_argument('-c', '--copy', help='Copy alias data from MailCow server to local DB.\n\n',
|
||||
required=False, action='store_true')
|
||||
|
||||
args = vars(parser.parse_args())
|
||||
|
||||
if args['api']:
|
||||
@ -279,6 +289,8 @@ elif args['add']:
|
||||
create(args['add'][0][0],args['add'][0][1])
|
||||
elif args['version']:
|
||||
show_current_info()
|
||||
elif args['version']:
|
||||
copy_data()
|
||||
|
||||
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user