#!/soft/packages/python/2.6/bin/python

import argparse
import json
import os
import sys

def main():
    parser = argparse.ArgumentParser(description='program for enabling the upload page')
    args = parser.parse_args()

    conf_file = open(os.path.dirname(__file__) + "/../conf/conf.json")
    json_conf = json.load(conf_file)
    lock_file = json_conf['upload']['lock_dir'] + "/upload.lock"

    if os.path.isfile(lock_file):
        os.unlink(lock_file)

if __name__ == "__main__":
    sys.exit( main() )
