#!/bin/bash

# @file run-in-nginx-namespace

# Copyright (C) Metaswitch Networks
# If license terms are provided to you in a COPYING file in the root directory
# of the source code repository by which you are accessing this code, then
# the license outlined in that COPYING file applies to your use.
# Otherwise no rights are granted except for those provided to you by
# Metaswitch Networks in a separate written agreement.

. /usr/share/clearwater/utils/check-root-permissions 1

# Returns the namespace_prefix (only set if the nginx_namespace is in use).
. /etc/clearwater/config
[ -z "$nginx_namespace" ] || namespace_prefix="ip netns exec $nginx_namespace"
$namespace_prefix $*
