-added quotes to all paths in rm -rf statements
This commit is contained in:
parent
2f5a1c4df6
commit
948a0e584d
|
@ -277,7 +277,7 @@ class AirtimeInstall
|
||||||
|
|
||||||
public static function DeleteFilesRecursive($p_path)
|
public static function DeleteFilesRecursive($p_path)
|
||||||
{
|
{
|
||||||
$command = "rm -rf $p_path";
|
$command = "rm -rf \"$p_path\"";
|
||||||
exec($command);
|
exec($command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ class AirtimeInstall
|
||||||
public static function UninstallPhpCode()
|
public static function UninstallPhpCode()
|
||||||
{
|
{
|
||||||
echo "* Removing PHP code from ".AirtimeInstall::CONF_DIR_WWW.PHP_EOL;
|
echo "* Removing PHP code from ".AirtimeInstall::CONF_DIR_WWW.PHP_EOL;
|
||||||
exec("rm -rf ".AirtimeInstall::CONF_DIR_WWW);
|
exec("rm -rf \"{${AirtimeInstall::CONF_DIR_WWW}}\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function InstallBinaries()
|
public static function InstallBinaries()
|
||||||
|
@ -336,7 +336,7 @@ class AirtimeInstall
|
||||||
public static function UninstallBinaries()
|
public static function UninstallBinaries()
|
||||||
{
|
{
|
||||||
echo "* Removing Airtime binaries from ".AirtimeInstall::CONF_DIR_BINARIES.PHP_EOL;
|
echo "* Removing Airtime binaries from ".AirtimeInstall::CONF_DIR_BINARIES.PHP_EOL;
|
||||||
exec("rm -rf ".AirtimeInstall::CONF_DIR_BINARIES);
|
exec("rm -rf \"{${AirtimeInstall::CONF_DIR_BINARIES}}\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function DirCheck()
|
public static function DirCheck()
|
||||||
|
@ -386,6 +386,6 @@ class AirtimeInstall
|
||||||
$path = AirtimeInstall::CONF_DIR_LOG;
|
$path = AirtimeInstall::CONF_DIR_LOG;
|
||||||
echo "* Removing logs directory ".$path.PHP_EOL;
|
echo "* Removing logs directory ".$path.PHP_EOL;
|
||||||
|
|
||||||
exec("rm -rf $path");
|
exec("rm -rf \"$path\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ function InstallBinaries()
|
||||||
function UninstallBinaries()
|
function UninstallBinaries()
|
||||||
{
|
{
|
||||||
echo "* Removing Airtime binaries from ".CONF_DIR_BINARIES.PHP_EOL;
|
echo "* Removing Airtime binaries from ".CONF_DIR_BINARIES.PHP_EOL;
|
||||||
exec("rm -rf ".CONF_DIR_BINARIES);
|
exec("rm -rf \"{${CONF_DIR_BINARIES}}\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ $pathnames = array("/usr/bin/airtime-pypo-start",
|
||||||
|
|
||||||
foreach ($pathnames as $pn){
|
foreach ($pathnames as $pn){
|
||||||
echo "Removing $pn\n";
|
echo "Removing $pn\n";
|
||||||
exec("rm -rf ".$pn);
|
exec("rm -rf \"$pn\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ $values = parse_ini_file(CONF_FILE_AIRTIME, true);
|
||||||
$phpDir = $values['general']['airtime_dir'];
|
$phpDir = $values['general']['airtime_dir'];
|
||||||
|
|
||||||
InstallPhpCode($phpDir);
|
InstallPhpCode($phpDir);
|
||||||
|
AirtimeIni::CreateMonitFile();
|
||||||
|
|
||||||
//update utils (/usr/lib/airtime) folder
|
//update utils (/usr/lib/airtime) folder
|
||||||
UninstallBinaries();
|
UninstallBinaries();
|
||||||
|
|
|
@ -12,7 +12,7 @@ if os.geteuid() != 0:
|
||||||
PATH_INI_FILE = '/etc/airtime/media-monitor.cfg'
|
PATH_INI_FILE = '/etc/airtime/media-monitor.cfg'
|
||||||
|
|
||||||
def remove_path(path):
|
def remove_path(path):
|
||||||
os.system("rm -rf " + path)
|
os.system('rm -rf "%s"' % path)
|
||||||
|
|
||||||
def get_current_script_dir():
|
def get_current_script_dir():
|
||||||
current_script_dir = os.path.realpath(__file__)
|
current_script_dir = os.path.realpath(__file__)
|
||||||
|
|
|
@ -12,7 +12,7 @@ if os.geteuid() != 0:
|
||||||
PATH_INI_FILE = '/etc/airtime/pypo.cfg'
|
PATH_INI_FILE = '/etc/airtime/pypo.cfg'
|
||||||
|
|
||||||
def remove_path(path):
|
def remove_path(path):
|
||||||
os.system("rm -rf " + path)
|
os.system('rm -rf "%s"' % path)
|
||||||
|
|
||||||
def get_current_script_dir():
|
def get_current_script_dir():
|
||||||
current_script_dir = os.path.realpath(__file__)
|
current_script_dir = os.path.realpath(__file__)
|
||||||
|
|
|
@ -12,7 +12,7 @@ if os.geteuid() != 0:
|
||||||
PATH_INI_FILE = '/etc/airtime/recorder.cfg'
|
PATH_INI_FILE = '/etc/airtime/recorder.cfg'
|
||||||
|
|
||||||
def remove_path(path):
|
def remove_path(path):
|
||||||
os.system("rm -rf " + path)
|
os.system('rm -rf "%s"' % path)
|
||||||
|
|
||||||
def get_current_script_dir():
|
def get_current_script_dir():
|
||||||
current_script_dir = os.path.realpath(__file__)
|
current_script_dir = os.path.realpath(__file__)
|
||||||
|
|
Loading…
Reference in New Issue