hugopereira84
10/6/2015 - 8:48 AM

Tooltips sh / Get user in terminal and apache

Tooltips sh / Get user in terminal and apache

#!/bin/bash -e
#echo $(dirname $(readlink -f $0))

USER=$(whoami)
APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {print $1}')


echo $(whoami)
echo $(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {print $1}')