2011-07-05 18:35:03 +02:00
|
|
|
#!/bin/sh
|
|
|
|
QUBES_RPC=/etc/qubes_rpc
|
|
|
|
if ! [ $# = 2 ] ; then
|
|
|
|
echo $0: bad argument count >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CFG_FILE=$QUBES_RPC/"$1"
|
2012-07-14 22:54:23 +02:00
|
|
|
export QREXEC_REMOTE_DOMAIN="$2"
|
2011-07-05 18:35:03 +02:00
|
|
|
if [ -s "$CFG_FILE" ] ; then
|
2012-07-14 22:54:23 +02:00
|
|
|
exec $(cat "$CFG_FILE")
|
2011-07-05 18:35:03 +02:00
|
|
|
echo "$0: failed to execute handler for" "$1" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "$0: nonexistent or empty" "$CFG_FILE" file >&2
|
|
|
|
exit 1
|