Ticket #18665: rabbitmqctl_wrapper.diff

File rabbitmqctl_wrapper.diff, 536 bytes (added by cpettitt@…, 16 years ago)
  • rabbitmqctl_wrapper

    old new  
    11#!/bin/bash
    2 # Escape spaces and quotes, because shell is revolting.
    3 for arg in "$@" ; do
    4         # Escape quotes in parameters, so that they're passed through cleanly.
    5         arg=$(sed -e 's/"/\\"/' <<-END
    6                 $arg
    7                 END
    8         )
    9         CMDLINE="${CMDLINE} \"${arg}\""
    10 done
    11 
    12 cd /
    13 exec su rabbitmq -c "@PREFIX@/sbin/rabbitmqctl_real ${CMDLINE}"
     2exec sudo -H -u rabbitmq "@PREFIX@/sbin/rabbitmqctl_real" "$@"