aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga-advisories/templates/update_script
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mga-advisories/templates/update_script')
-rw-r--r--modules/mga-advisories/templates/update_script4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mga-advisories/templates/update_script b/modules/mga-advisories/templates/update_script
index 9d15c5ca..273efff1 100644
--- a/modules/mga-advisories/templates/update_script
+++ b/modules/mga-advisories/templates/update_script
@@ -2,8 +2,8 @@
set -e
if [ "$UID" = "0" ]; then
- echo "You are root. You shouldn't be. Try being <%= @mgaadv_login %> instead." >&2
- exit 1
+ echo "Re-running as <%= @mgaadv_login %>." >&2
+ exec /usr/bin/su -c <%= @update_script %> - <%= @mgaadv_login %>
fi
cd <%= @advisories_dir %>