mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
inc: create directory, then use it
This commit is contained in:
parent
5dc5303c53
commit
bdc51d075e
@ -52,6 +52,9 @@ function setup_gateways_monitor()
|
||||
{
|
||||
global $config, $g;
|
||||
|
||||
@mkdir('/var/db/rrd', 0775);
|
||||
@chown('/var/db/rrd', 'nobody');
|
||||
|
||||
$gateways_arr = return_gateways_array();
|
||||
if (!is_array($gateways_arr)) {
|
||||
log_error("No gateways to monitor. Apinger will not be run.");
|
||||
@ -339,10 +342,6 @@ EOD;
|
||||
@file_put_contents('/var/etc/apinger.conf', $apingerconfig);
|
||||
unset($apingerconfig);
|
||||
|
||||
@chmod('/tmp', 01777);
|
||||
@mkdir('/var/db/rrd', 0775);
|
||||
@chown('/var/db/rrd', 'nobody');
|
||||
|
||||
/* Restart apinger process */
|
||||
if (isvalidpid('/var/run/apinger.pid')) {
|
||||
killbypid('/var/run/apinger.pid', 'HUP');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user