aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/clef/docs/qubes/qubes.Clefsign
blob: 9b5af7b4fe00984b2a203f8cd195d6ed2637990e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

SIGNER_BIN="/home/user/tools/clef/clef"
SIGNER_CMD="/home/user/tools/gtksigner/gtkui.py -s $SIGNER_BIN"

# Start clef if not already started
if [ ! -S /home/user/.clef/clef.ipc ]; then
    $SIGNER_CMD &
    sleep 1
fi

# Should be started by now
if [ -S /home/user/.clef/clef.ipc ]; then
    # Post incoming request to HTTP channel
    curl -H "Content-Type: application/json" -X POST -d @- http://localhost:8550 2>/dev/null
fi