sys.argv[0] = os.path.realpath(sys.argv[0]) # on fork the current directory changes to / resulting in the wrong resources directory if started with a relative path
pid_file = '{}.pid'.format(name)
try:
process.daemonize(pid_file)
except ProcessError as e:
log.fatal('Failed to start {name}: {exception!s}'.format(name=fullname, exception=e))
sys.exit(1)
log.use_syslog(name)
from sylk.resources import Resources
from sylk.server import SylkServer, ServerConfig
log.info('Starting {name} {sylk.__version__}, using SIP SIMPLE SDK {sipsimple.__version__}'.format(name=fullname, sylk=sylk, sipsimple=sipsimple))