Skip to content

Commit

Permalink
Add equivalent --services-only and --daemons-only arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Jul 29, 2015
1 parent ba11633 commit 7533757
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tracer/controllers/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def __init__(self, args, packages):
self.tracer.specified_packages = packages

self.applications = self.tracer.trace_affected(self._user(args.user))
if self.args.daemons_only:
self.applications = self.applications.filter_types([Applications.TYPES["DAEMON"]])

def render(self):
if not self.args.hooks_only:
Expand Down
6 changes: 6 additions & 0 deletions tracer/resources/args_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@
help='list even session and unrestartable applications'
)

parser.add_argument('--daemons-only', '--services-only',
dest='daemons_only',
action='store_true',
help='list only daemons/services'
)

parser.add_argument('--hooks-only',
dest='hooks_only',
action='store_true',
Expand Down

0 comments on commit 7533757

Please sign in to comment.