CC-2831: airtime-update-db-setting permission error
-fixed
This commit is contained in:
parent
2128867b4f
commit
23b2802c64
|
@ -6,7 +6,7 @@ require_once('DB.php');
|
||||||
class AirtimeInstall
|
class AirtimeInstall
|
||||||
{
|
{
|
||||||
const CONF_DIR_BINARIES = "/usr/lib/airtime";
|
const CONF_DIR_BINARIES = "/usr/lib/airtime";
|
||||||
const CONF_DIR_WWW = "/usr/share/airtime/";
|
const CONF_DIR_WWW = "/usr/share/airtime";
|
||||||
const CONF_DIR_LOG = "/var/log/airtime";
|
const CONF_DIR_LOG = "/var/log/airtime";
|
||||||
|
|
||||||
public static $databaseTablesCreated = false;
|
public static $databaseTablesCreated = false;
|
||||||
|
|
|
@ -5,10 +5,15 @@ we need to update database host, dbname, username and password.
|
||||||
This script reads from airtime.conf.
|
This script reads from airtime.conf.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
from xml.dom.minidom import Node
|
from xml.dom.minidom import Node
|
||||||
|
|
||||||
|
if os.geteuid() != 0:
|
||||||
|
print "Please run this as root."
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
#Read the universal values
|
#Read the universal values
|
||||||
parser = ConfigParser.SafeConfigParser()
|
parser = ConfigParser.SafeConfigParser()
|
||||||
parser.read('/etc/airtime/airtime.conf')
|
parser.read('/etc/airtime/airtime.conf')
|
||||||
|
|
Loading…
Reference in New Issue