Autoinstaller API

From Sohowiki
Jump to: navigation, search

Here's the basic step by step for writing your own installer script

Contents

1. Ping our api to get latest build download link

# Pull data for current stable build
ob_start();
include("http://update.securexfer.net/public_builds/api-build_info-stable.php");
$pubBuild = ob_get_contents();
ob_end_clean();
$current_stable_info_array = unserialize($pubBuild);

2. Download build file

$myfile = file_get_contents($current_stable_info_array['download_full']);

3. Write file to server

<?php
$fp = fopen('/path/to/website/public_html/soho.tgz', 'w');
fwrite($fp, $myfile);
fclose($fp);
?>

4. Extract downloaded build file

shell_exec('tar -xzvf /path/to/website/public_html/soho.tgz');

5. Create a database with its own username and password (with full privileges)

Will leave this step up to you and your root-level coding magic.

CREATE DATABASE usergoeshere_whatever;
GRANT ALL PRIVILEGES ON usergoeshere_whatever.* to usergoeshere@localhost
IDENTIFIED BY 'passwordhere';

6. Write the isp.conf.php file

This is the config file that Soholaunch needs to run properly.

It goes here...

/path/to/website/public_html/sohoadmin/config/isp.conf.php

It look like this...

<?php exit; ?>

#########################################################
### SOHOLAUNCH V4.8 CONFIGURATION SETUP
#########################################################
this_ip=provx.soholaunch.com

db_server=localhost
db_name=usergoeshere_whatever
db_un=usergoeshere
db_pw=passwordhere

user_table=login
cgi_bin=/path/to/website/public_html/sohoadmin/tmp_content
doc_root=/path/to/website/public_html

dflogin_user=admin
dflogin_pass=admin

lang_set=english.php
lang_dir=/path/to/website/public_html/sohoadmin/language

template_lib=/path/to/website/public_html/sohoadmin/program/modules/site_templates/pages

map_obj=enabled
df_template_cat=Neutral
#########################################################

Done!

Personal tools