Script specification

Some scripts are in the bin directory under the Cassiopeia root directory. It helps user to configure a Cassiopeia settings.

init_db.rb

Description

init_db.rb initializes shop's database which is specified by config.rb.

Usage

# $CASSIOPEIA_HOME/bin/init_db.rb $SHOP_NAME

Implementation

  1. init_db.rb create all database tables required by Cassiopeia.

Note

  1. init_db.rb does not create new database. Therefore, user has to prepare the database previously.

create_shop.rb

Description

create_shop.rb create new shop directories and files on $CASSIOPEIA_HOME/shop.

Usage

# $CASSIOPEIA_HOME/bin/create_shop.rb $SHOP_NAME

Implementation

  1. Copy shop skeleton $CASSIOPEIA_HOME/skel to $CASSIOPEIA_HOME/shop/$SHOP_NAME.
  2. Making symbolic links for CGI. CGI is on $CASSIOPEIA_HOME/cgi.
  3. Modifying some values of config.rb: CASSIOPEIA_HOME, SHOP_USERNAME and SHOP_PATH.

Note

  • It is recommended to use only lowercase alphabet characters for $SHOP_NAME.

remove_shop.rb

Description

remove_shop.rb destructs shop directory from $CASSIOPEIA_HOME/shop.

Usage

# $CASSIOPEIA_HOME/bin/remove_shop.rb $SHOP_NAME

Implementation

  1. Remove shop directory.

Note

register_shop.rb

Description

register_shop.rb registers shop user data to database which is specified by $CASSIOPEIA_HOME/shop/$SHOP_NAME/config.rb.

Usage

# $CASSIOPEIA_HOME/bin/register_shop.rb $SHOP_NAME $PASSWORD

Parameters

  1. $PASSWORD: Password to enter the administration page of this shop.

Implementation

  1. Generate randomized cryption salt.
  2. Crypt password and register some shop data: Shop, Shop::Content and Shop::Configuration.

Note

unregister_shop.rb

Description

unregister_shop.rb unregisters shop user data from database which is specified by $CASSIOPEIA_HOME/shop/$SHOP_NAME/config.rb.

Usage

# $CASSIOPEIA_HOME/bin/unregister_shop.rb $SHOP_NAME

Implementation

  1. Unregister some shop data: Shop, Shop::Content and Shop::Configuration.

create_cgi_link.rb

Description

create_cgi_link.rb create symbolic links to each cgi for one shop.

It is supposed to be used when the links are broken or to use new cgi.

Usage

# $CASSIOPEIA_HOME/bin/create_cgi_link.rb $SHOP_NAME

Prev

Top

Upward

Next