git://git.camperquake.de
/
time-slider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add command line argument parsing and --foreground parameter
[time-slider.git]
/
usr
/
share
/
time-slider
/
lib
/
time_slider
/
timesliderd.py
diff --git
a/usr/share/time-slider/lib/time_slider/timesliderd.py
b/usr/share/time-slider/lib/time_slider/timesliderd.py
index
f9c8e3a
..
08a2937
100755
(executable)
--- 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 datetime
import calendar
import signal
+import argparse
import glib
import gobject
import glib
import gobject
@@
-928,9
+929,13
@@
def create_daemon():
def main(argv):
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.
# 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
# The user security attributes checked are the following:
# Note that UID == 0 will match any profile search so