#!/usr/bin/python import os import sys import pwd sys.path.insert(0, "/etc/calliope") import config if os.path.exists(config.db_path): sys.exit(0) import calliope.db from calliope.channeltuner import ChannelTuner from calliope.tuner import Tuner from calliope.channel import Channel from calliope.recording import Recording ChannelTuner.createTable() Tuner.createTable() Channel.createTable() Recording.createTable() uid = pwd.getpwnam(sys.argv[1]) os.chown(config.db_path, uid.pw_uid, uid.pw_gid) os.chmod(config.db_path, 0664)