Autoinstaller API

From Sohowiki
(Difference between revisions)
Jump to: navigation, search
(3. Write file to server)
(6. Write the isp.conf.php file)
Line 34: Line 34:
 
This is the config file that Soholaunch needs to run properly.
 
This is the config file that Soholaunch needs to run properly.
  
It goes here...
+
'''It goes here...'''
 
  /path/to/website/public_html/sohoadmin/config/isp.conf.php
 
  /path/to/website/public_html/sohoadmin/config/isp.conf.php
  
It look like this...
+
'''It look like this...'''
  
<?php exit; ?>
+
<pre>
 +
<?php exit; ?>
  
#########################################################
+
#########################################################
### SOHOLAUNCH V4.8 CONFIGURATION SETUP
+
### SOHOLAUNCH V4.8 CONFIGURATION SETUP
#########################################################
+
#########################################################
this_ip=provx.soholaunch.com
+
this_ip=provx.soholaunch.com
  
db_server=localhost
+
db_server=localhost
db_name=usergoeshere_whatever
+
db_name=usergoeshere_whatever
db_un=usergoeshere
+
db_un=usergoeshere
db_pw=passwordhere
+
db_pw=passwordhere
  
user_table=login
+
user_table=login
cgi_bin=/path/to/website/public_html/sohoadmin/tmp_content
+
cgi_bin=/path/to/website/public_html/sohoadmin/tmp_content
doc_root=/path/to/website/public_html
+
doc_root=/path/to/website/public_html
  
dflogin_user=admin
+
dflogin_user=admin
dflogin_pass=admin
+
dflogin_pass=admin
  
lang_set=english.php
+
lang_set=english.php
lang_dir=/path/to/website/public_html/sohoadmin/language
+
lang_dir=/path/to/website/public_html/sohoadmin/language
  
template_lib=/path/to/website/public_html/sohoadmin/program/modules/site_templates/pages
+
template_lib=/path/to/website/public_html/sohoadmin/program/modules/site_templates/pages
  
map_obj=enabled
+
map_obj=enabled
df_template_cat=Neutral
+
df_template_cat=Neutral
#########################################################
+
#########################################################
 +
</pre>
 +
 
 +
Done!

Revision as of 14:34, 22 October 2009

Contents

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

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