|
Running Batch Processor |
|
|
In order to see the list of the Batch Processor options, run the utility with the '--help' key: ./batch.php –help
The script will display the following details and exit: LiteCommerce ASPE Batch Processor v. 2.1 batch.php --admin_login=<value> --admin_passwd=<value> [--OPTIONS=<args>] batch.php --admin_login=<value> --admin_passwd=<value> -r -u=<value> Administrator credentials: --admin_login=... LiteCommerce ASPE administrator login --admin_passwd=... LiteCommerce ASPE administrator password --db_root_user=... MySQL root username (uses saved if empty) --db_root_passwd=... Password for MySQL root user (uses saved if empty) -u=, --url=... URL of a new shop, including web directory Example: http://www.example.com/shop1 -s=, --secure_url=... HTTPS URL of the new shop (optional) Example: https://secure.example.com/shop1 -p=, --path=... Absolute file path to the new shop -d=, --db_name=... MySQL database name for the new shop -U=, --db_user=... MySQL database username for the new shop -P=, --db_passwd=... Password for MySQL database username -l=, --login=... E-mail of the administrator of the new shop -z=, --passwd=... Password for the administrator of the new shop -a=, --access_policy=... Access policy to assign to the new shop -m=, --modules=... Comma-separated list of modules to install on the new shop (optional) -r, --remove_shop Uninstall a shop -q, --quiet Operate in quiet mode -?, --help Display this help and exit
The following example demonstrates a call of the Batch Processor that creates a store in the 'store1' subfolder of the 'www.example.com' site, enabling 2 add-on modules for it and setting a 'web based' access policy: batch.php --admin_login=aspeadm@example.com –admin_passwd=SECRET --url=http://www.example.com/store1 --path=/var/www/store1 --access_policy="web based" --modules="GreetVisitor,ProductOptions" --db_name=store1_db –db_user=store1 –db_passwd=st1dbpwd --login=store1@example.com --passwd=st1pwd -q
Please note that in the above-mentioned example, neither '--db_root_user' nor '--db_root_passwd' is provided; these are taken from LiteCommerce ASPE settings. Also note, that the installation is performed without any output – this is enforced by the '-q' optional parameter. The script will install the shop: create the database and the necessary tables, copy the appropriate files, and send out e-mail notifications to LiteCommerce ASPE administrator and an e-mail specified as the default client store administrator e-mail. The next example demonstrates a call of the Batch Processor that will delete a store with a given URL: batch.php --admin_login=aspeadm@example.com –admin_passwd=SECRET --url=http://www.example.com/store1 –remove_shop
The script will remove the data pertinent to the store setup from LiteCommerce ASPE database, delete the corresponding store files, store database and the database user from the system. If the Batch Processor encounters problems during the shop installation/deinstallation process, it exits with one of the following exit codes: define('SHOP_URL_NOT_FOUND', 200); define('SHOP_URL_EXISTS', 201); define('SHOP_PATH_EXISTS', 202); define('SHOP_DB_EXISTS', 203); define('SHOP_LICENSE_INVALID', 204); define('SHOP_PATH_INVALID', 205); define('SHOP_DB_ERROR', 206); define('SHOP_URL_WRONG', 207); define('SHOP_PATH_SYMLINK', 208); |