Skip to content

Instantly share code, notes, and snippets.

@bindiego
Created September 24, 2014 09:22
Show Gist options
  • Save bindiego/068cd67ebeeee3282ac2 to your computer and use it in GitHub Desktop.
Save bindiego/068cd67ebeeee3282ac2 to your computer and use it in GitHub Desktop.
shows apache user
#!/bin/bash
APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {if ($1) print $1}')
echo $APACHE_USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment