X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=time-slider.git;a=blobdiff_plain;f=usr%2Fshare%2Ftime-slider%2Flib%2Ftime_slider%2Ftimesliderd.py;h=dc669b6acc6f5e1879a8a340bde2a4d0d3ba2e0c;hp=f9c8e3acb87a23ae19180f57bfc40e13d735fadc;hb=bb5f597d37e6c9d9957f7eaf9b6310a3ec071651;hpb=b4d3543951892154a1493edcc451937537371044 diff --git a/usr/share/time-slider/lib/time_slider/timesliderd.py b/usr/share/time-slider/lib/time_slider/timesliderd.py index f9c8e3a..dc669b6 100755 --- a/usr/share/time-slider/lib/time_slider/timesliderd.py +++ b/usr/share/time-slider/lib/time_slider/timesliderd.py @@ -31,6 +31,7 @@ import time import datetime import calendar import signal +import argparse import glib import gobject @@ -42,10 +43,10 @@ import dbus.mainloop.glib import dbussvc import zfs import smf -import timeslidersmf -import autosnapsmf +import time_slider.linux.timeslidersmf as timeslidersmf +import time_slider.linux.autosnapsmf as autosnapsmf import plugin -from rbac import RBACprofile +from time_slider.linux.rbac import RBACprofile import util _MINUTE = 60 @@ -928,9 +929,13 @@ def create_daemon(): def main(argv): + parser = argparse.ArgumentParser() + parser.add_argument('--foreground', action='store_true', help='Do not daemonize', default=False) + args, _ = parser.parse_known_args() # Daemonise the service. - create_daemon() + if not args.foreground: + create_daemon() # The user security attributes checked are the following: # Note that UID == 0 will match any profile search so