OpenSource CLI-App to install and handle stuff related to Web-Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
534 B

<?php
namespace App\Helpers;
class InstallHelper
{
//
const PACKAGE_STATUS = 'Status: install ok installed';
/**
* check if a packege is installed
*
* @param string $name
* @return boolean
*/
public function isReady($name)
{
$result = false;
exec('echo $(dpkg -s nginx 2>&1 | grep "'.self::PACKAGE_STATUS.'")', $output);
if (isset($output[0]) && $output[0] === self::PACKAGE_STATUS) {
$result = true;
}
return $result;
}
}