#!/bin/sh -e

##########################################################################
#   Title:
#       Optional, defaults to the name of the script sans extention
#
#   Section:
#       8
#
#   Synopsis:
#       
#   Description:
#       Verify that calling user is a member of operator.
#       
#   Arguments:
#       
#   Returns:
#
#   Examples:
#
#   Files:
#
#   Environment:
#
#   See also:
#       
#   History:
#   Date        Name        Modification
#   2019-07-16  Jason Bacon Begin
#   2024-11-12  Jason Bacon Add man page template and usage
##########################################################################

usage()
{
    printf "Usage: $0 group calling-script-name\n"
    exit 1
}


##########################################################################
#   Main
##########################################################################

if [ $# != 2 ]; then
    usage
fi
group="$1"
script="$2"

if ! groups | fgrep -q "$group"; then
    printf "$script can only be run by members of $group.\n"
    exit 1
fi
