#!/bin/sh
set -eu

SERVICE_SRC="packaging/qubes/rpc/qubes.NsignerRpc"
SERVICE_DST="/etc/qubes-rpc/qubes.NsignerRpc"

if [ ! -f "$SERVICE_SRC" ]; then
    echo "Missing service source: $SERVICE_SRC" >&2
    exit 1
fi

install -m 0755 "$SERVICE_SRC" "$SERVICE_DST"

echo "Installed qrexec service to $SERVICE_DST"
echo "Executable bit set via install -m 0755."
