Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save HostOnNet/48e2b2f4561af7a4d69c2fa1efa0f529 to your computer and use it in GitHub Desktop.

Select an option

Save HostOnNet/48e2b2f4561af7a4d69c2fa1efa0f529 to your computer and use it in GitHub Desktop.
function my_post_install($installation){
global $soft, $software, $globals, $__settings;
// Do stuff here e.g. is as follows
if($soft == 586){
$ftp = sftp_connect($__settings['server_host'], $__settings['ftp_user'], $__settings['ftp_pass'], $__settings['protocol'], $__settings['port'], $__settings['ftp_path'], $__settings['public_key'], $__settings['private_key'], $__settings['passphrase']);
$ftp->exec('sudo chown www-data:www-data '.$__settings['softdatadir']);
}
$fileContent = file_get_contents('/var/www/owncloud/public_html/config/config.php');
$fileContent = $fileContent . "
\$CONFIG['memcache.local'] = '\OC\Memcache\APCu';
";
file_put_contents('/var/www/owncloud/public_html/config/config.php', $fileContent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment