Tizen 2.1 base
[platform/upstream/hplip.git] / packaging / hp-systray.wrapper
1 #! /bin/bash
2
3 # Be polite and sleep a bit to let more important processes go ahead
4 # (in particular after booting let the cupsd finish its startup):
5 sleep 10
6 # Run hp-systray only if an appropriate local print queue exists
7 # (i.e. on localhost a queue with a "hp:/..." DeviceURI)
8 # see https://bugzilla.novell.com/show_bug.cgi?id=649280
9 # otherwise and in case of any error do an unnoticeable exit:
10 set -o pipefail
11 lpstat -h localhost -v | grep -q ': hp:/' || exit 0
12 # Replace this wrapper with the actual command
13 # so that it exits with the exit code of the command
14 # and that the command gets any signals directly,
15 # see https://bugzilla.novell.com/show_bug.cgi?id=499735
16 exec hp-systray
17