#!/usr/bin/env python
import os
from airflow import models, settings
from airflow.contrib.auth.backends.password_auth import PasswordUser

os.system('/entrypoint initdb')

user = PasswordUser(models.User())
user.username = 'vulhub'
user.email = 'vulhub@example.com'
user.password = 'vulhub'
user.superuser = True
session = settings.Session()
session.add(user)
session.commit()
session.close()
print('initial user finished')
