#!/usr/bin/env python
#
#   Simple Backup - Launcher script for DBus System Service
#
#   Copyright (c)2009-2010: Jean-Peer Lorenz <peer.loz@gmx.net>
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#


if __name__ == '__main__':

    import sys

    from sbackup.util import get_locale_dir, get_locale_domain
    application = get_locale_domain()
    locale_dir = get_locale_dir()

    import gettext
    gettext.bindtextdomain(application, locale_dir)
    gettext.textdomain(application)

#TODO: how can we drop the privileges here? Environment is cleared.
#    from sbackup.util.system import drop_privileges
#    drop_privileges()

    from sbackup.dbus_service import run
    retc = run(sys.argv)
    sys.exit(retc)

