/usr/bin/mailnag-config is in mailnag 1.2.1-1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# mailnag-config
#
# Copyright 2011 - 2016 Patrick Ulbrich <zulu99@gmx.net>
# Copyright 2011 Ralf Hersel <ralf.hersel@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 Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
import gi
gi.require_version('Gtk', '3.0')
import os
import subprocess
from gi.repository import Gtk
from dbus.mainloop.glib import DBusGMainLoop
from Mailnag.common.utils import fix_cwd
fix_cwd()
from Mailnag.common.utils import set_procname, shutdown_existing_instance
from Mailnag.common.dist_cfg import BIN_DIR
from Mailnag.configuration.configwindow import ConfigWindow
def main():
set_procname("mailnag-config")
confwin = ConfigWindow()
Gtk.main()
if confwin.daemon_enabled:
try:
# the launched daemon shuts down
# an already running daemon
print "Launching Mailnag daemon."
subprocess.Popen(os.path.join(BIN_DIR, "mailnag"))
except:
print "ERROR: Failed to launch Mailnag daemon."
else:
DBusGMainLoop(set_as_default = True)
# shutdown running Mailnag daemon
shutdown_existing_instance()
if __name__ == "__main__": main()
|