#!/usr/bin/python
import sys
import os
import getpass

logfilename = "/tmp/swarmtrans-"+getpass.getuser()+".log"
f = open(logfilename,"w")
sys.stderr = f

tribler_root = os.path.abspath(os.path.dirname(__file__))
os.chdir(tribler_root)

sys.path.insert(0, tribler_root)
import Tribler.Plugin.BackgroundProcess

Tribler.Plugin.BackgroundProcess.DEBUG = False
if len(sys.argv) > 1 and sys.argv[1] == 'debug':
   Tribler.Plugin.BackgroundProcess.DEBUG = True

Tribler.Plugin.BackgroundProcess.run_bgapp("SwarmPlugin")

