Script specification

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

Special variables

In following explanations, these variables is used.

init_db.rb

Description

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

Usage

# $CASSIOPEIA_HOME/bin/init_db.rb $USERNAME

Parameters

  • $USERNAME: Shop's user name.

Detail

  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 $USERNAME

Parameters

  1. $USERNAME: Shop's user name. It is unique and unchangeable.

Detail

  1. Copy shop skeleton $CASSIOPEIA_HOME/skel to $CASSIOPEIA_HOME/shop/$USERNAME.
  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 $USERNAME.

remove_shop.rb

Description

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

Usage

# $CASSIOPEIA_HOME/bin/remove_shop.rb $USERNAME

Parameters

  • $USERNAME: Shop's user name.

Detail

  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/$USERNAME/config.rb.

Usage

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

Parameters

  1. $USERNAME: Shop's user name.
  2. $PASSWORD: Password to enter the administration page of this shop.

Detail

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

Note

unregister_shop.rb

Description

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

Usage

# $CASSIOPEIA_HOME/bin/unregister_shop.rb $USERNAME

Parameters

  1. $USERNAME: Shop's user name.

Detail

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

Note

Prev

Top

Upward

Next