Changes

Jump to navigation Jump to search
1,746 bytes added ,  21:32, 4 November 2014
Line 837: Line 837:     
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}
 
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}
 +
 +
 +
====Create DB manually by a script====
 +
 +
An example on how create by hand some db with contents in a script. all these db can not be erased because for every 'post-upgrade signal-event; signal-event reboot', the default values set manually below will return.
 +
 +
mkdir -p          /etc/e-smith/db/accounts/defaults/wordpress
 +
echo "reserved" > /etc/e-smith/db/accounts/defaults/wordpress/type
 +
 +
mkdir -p                  /etc/e-smith/db/configuration/defaults/wordpress
 +
echo "Wordpress weblog" > /etc/e-smith/db/configuration/defaults/wordpress/Name
 +
echo "global"          > /etc/e-smith/db/configuration/defaults/wordpress/PublicAccess
 +
echo "enabled"          > /etc/e-smith/db/configuration/defaults/wordpress/status
 +
echo "wordpress"        > /etc/e-smith/db/configuration/defaults/wordpress/DbName
 +
echo "wordpress"        > /etc/e-smith/db/configuration/defaults/wordpress/DbUser
 +
echo "en"              > /etc/e-smith/db/configuration/defaults/wordpress/WpLang
 +
 +
in order to initialize all db settings
 +
/etc/e-smith/events/actions/initialize-default-databases
 +
 +
====Create DB manually by 'config'
 +
If you want to create a key entry manually you can use the 'config' command and save properties in the '''configuration database'''. For your information, once deleted you cannot retrieve default values as above.
 +
The generic Command line is :
 +
config configuration set key type [prop1 val1] [prop2 val2] ...
 +
for example you can do
 +
 +
config set plop configuration Name wordpress PublicAccess private status enabled DbName wordpress DbUser wordpress WpLang en
 +
 +
you can see the result
 +
 +
config show plop
 +
  plop=configuration
 +
    DbName=wordpress
 +
    DbUser=wordpress
 +
    Name=wordpress
 +
    PublicAccess=private
 +
    WpLang=en
 +
    status=enabled
    
===Modify Hidden settings of users===
 
===Modify Hidden settings of users===

Navigation menu