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
try:
process.daemonize(pidfile='{}.pid'.format(name))
exceptProcessErrorase:
log.fatal('Failed to start {name}: {exception!s}'.format(name=fullname,exception=e))
sys.exit(1)
log.use_syslog(name)
fromsylk.resourcesimportResources
fromsylk.serverimportSylkServer,ServerConfig
log.info('Starting {name}{sylk.__version__}, using SIP SIMPLE SDK {sipsimple.__version__}'.format(name=fullname,sylk=sylk,sipsimple=sipsimple))