#!/usr/bin/env python

import os,sys

# get the parameters.
parameters=sys.argv

print """

	\033[1;31mQinstall, Qmail Installer\033[m
	Baris Metin <baris@gelecek.com.tr>

	\033[1;32mhttp://obua.org/baris\033[m

	\033[1;31mOpenBSD port by Rietsch Thierry <t.rietsch@nzz.ch>\033[m
"""

#check the user if 0(root) run else quit
user=os.getuid()
if user:
	print "Sorry: Only the user \"root\" can run this program.\n\n"
	sys.exit(1)

if len(parameters) == 1:
	os.system("python qinstallcore_openbsd.py")
	sys.exit(0)

elif len(parameters) > 2:
	print "Error: Invalid number of parameters"

elif len(parameters) == 2 and parameters[1] == "-gui":
#	os.system("python qinstallgui.py")
	print "Sorry: As not tested, OpenBSD port does not support GUI yet."
	sys.exit(0)

else : print "Error: Wrong parameter"

