allow or not script
hi guys
I am working on a menu... and the menu has some options like check status for services (gmonitor group) or stop - start - restart those same services (gadmin group) as you see there are 2 main groups gmonitor for monitoring and gadmin for restart - stop - start services so checking command groups Code:
#groups root if group gadmin is found allow the user to restart services and if gmonitor group is found deny access to restart services the point is I don't know how to get that groupvar Code:
if [ "$groupvar" == "gadmin" ] |
You don't need the string, using the exit value like:
Code:
groups 2>/dev/null|grep -q gmonitor; case "$?" in Code:
if [ "${groupvar}" = "${groupvar//gadmin/}" ]; then |
All times are GMT -5. The time now is 04:23 PM. |