From c2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 4 Aug 2014 09:30:44 +0100 Subject: mga-advisories: Add configuration for running mgaadv in a way which moves packages. This adds an appropriate wrapper script to run the move script as root (which is needed) while keeping the rest running as the mga-advisories user. Disable the cron script for now as we will move over to running the full process but we should test it a bit first. --- modules/mga-advisories/templates/adv-move-pkg | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 modules/mga-advisories/templates/adv-move-pkg (limited to 'modules/mga-advisories/templates/adv-move-pkg') diff --git a/modules/mga-advisories/templates/adv-move-pkg b/modules/mga-advisories/templates/adv-move-pkg new file mode 100644 index 00000000..39d246ec --- /dev/null +++ b/modules/mga-advisories/templates/adv-move-pkg @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$USER" != "<%= @mgaadv_login %>" ]; then + echo "This script must be run as the <%= @mgaadv_login %> user." >&2 + exit 1 +fi + +exec sudo <%= @move_script %> "$@" -- cgit v1.2.1