Skip to content

Instantly share code, notes, and snippets.

@tlatsas
Last active December 22, 2015 03:49
Show Gist options
  • Save tlatsas/6412951 to your computer and use it in GitHub Desktop.
Save tlatsas/6412951 to your computer and use it in GitHub Desktop.
freepbx 2.11.0 patch
diff --git a/install_amp.orig b/install_amp
index 492e19e..5d48e30 100755
--- a/install_amp.orig
+++ b/install_amp
@@ -994,9 +994,9 @@ if($installamp_clean || $uninstallamp) {
// TODO: if we bootstrap, do this first before even trying. Also, is their a problem boostraping as user root???
//
outn("Checking user..");
-//$current_user=(isset($_ENV["USER"]) ? $_ENV["USER"] : exec('whoami',$output));
-$euid = (posix_getpwuid(posix_geteuid()));
-$current_user = $euid['name'];
+$current_user=(isset($_ENV["USER"]) ? $_ENV["USER"] : exec('whoami',$output));
+//$euid = (posix_getpwuid(posix_geteuid()));
+//$current_user = $euid['name'];
if ($current_user != "root"){
out("FAILED");
fatal($argv[0]." must be run as root");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment