#!/sbin/openrc-run # Updates proxy forwarder Startup script for the updates proxy forwarder # description: forwards connection to updates proxy over Qubes RPC # The clients should use the below shell variable exports: # http_proxy="http://127.0.0.1:8082/" # https_proxy="http://127.0.0.1:8082/" # For apk, see the /etc/profile.d/apk-proxy.sh alias name=$RC_SVCNAME cfgfile="/etc/qubes/$RC_SVCNAME.conf" command="/bin/busybox" command_args="nc -lk -s 127.0.0.1 -p 8082 -e /usr/bin/qrexec-client-vm @default qubes.UpdatesProxy" command_user="root" pidfile="/run/qubes/$RC_SVCNAME.pid" command_background="yes" output_log="/var/log/qubes/$RC_SVCNAME.log" error_log="/var/log/qubes/$RC_SVCNAME.err" depend() { need qubes-qrexec-agent need net } start_pre() { checkpath --directory --owner $command_user:qubes --mode 0775 \ /run/qubes \ /var/log/qubes \ /var/run/qubes # TODO should fail if qubes-update-proxy is running # if qsvc qubes-updates-proxy ; then # # updates proxy running here too, avoid looping traffic back to itself # exit 0 # fi }