diff options
Diffstat (limited to 'modules/mga-advisories/templates')
-rw-r--r-- | modules/mga-advisories/templates/update_script | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mga-advisories/templates/update_script b/modules/mga-advisories/templates/update_script index 273efff1..0f1ce6a7 100644 --- a/modules/mga-advisories/templates/update_script +++ b/modules/mga-advisories/templates/update_script @@ -6,6 +6,11 @@ if [ "$UID" = "0" ]; then exec /usr/bin/su -c <%= @update_script %> - <%= @mgaadv_login %> fi +if [ "$USER" != "<%= @mgaadv_login %>" ]; then + echo "This script must be run as the <%= @mgaadv_login %> user." >&2 + exit 1 +fi + cd <%= @advisories_dir %> svn up exec /usr/bin/mgaadv mksite |