Added when to execute an autogenerated file in ConfigDaemon
Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
@@ -283,7 +283,7 @@ class ConfigDaemon {
|
|||||||
// @TODO: Maybe have a backup - location somewhere central?
|
// @TODO: Maybe have a backup - location somewhere central?
|
||||||
// @TODO: Use IO - class
|
// @TODO: Use IO - class
|
||||||
if (array_key_exists('backup', $attributes)) {
|
if (array_key_exists('backup', $attributes)) {
|
||||||
$return[] = array('type' => 'command', 'content' => 'mv "' . $this->_parseContent($attributes['name']) . '" "' . $this->_parseContent($attributes['name']) . '.frx.bak"');
|
$return[] = array('type' => 'command', 'content' => 'mv "' . $this->_parseContent($attributes['name']) . '" "' . $this->_parseContent($attributes['name']) . '.frx.bak"', 'execute' => "pre");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now the content of the file can be written
|
// Now the content of the file can be written
|
||||||
@@ -295,12 +295,12 @@ class ConfigDaemon {
|
|||||||
|
|
||||||
// Let's check if the mode of the file should be changed
|
// Let's check if the mode of the file should be changed
|
||||||
if (array_key_exists('chmod', $attributes)) {
|
if (array_key_exists('chmod', $attributes)) {
|
||||||
$return[] = array('type' => 'command', 'content' => 'chmod ' . $attributes['chmod'] . ' "' . $this->_parseContent($attributes['name']) . '"');
|
$return[] = array('type' => 'command', 'content' => 'chmod ' . $attributes['chmod'] . ' "' . $this->_parseContent($attributes['name']) . '"', 'execute' => "post");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's check if the owner of the file should be changed
|
// Let's check if the owner of the file should be changed
|
||||||
if (array_key_exists('chown', $attributes)) {
|
if (array_key_exists('chown', $attributes)) {
|
||||||
$return[] = array('type' => 'command', 'content' => 'chown ' . $attributes['chown'] . ' "' . $this->_parseContent($attributes['name']) . '"');
|
$return[] = array('type' => 'command', 'content' => 'chown ' . $attributes['chown'] . ' "' . $this->_parseContent($attributes['name']) . '"', 'execute' => "post");
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have more than 1 element, we want to group this stuff for easier processing later
|
// If we have more than 1 element, we want to group this stuff for easier processing later
|
||||||
|
|||||||
Reference in New Issue
Block a user