Changes

From SME Server
Jump to navigationJump to search
362 bytes removed ,  02:44, 10 March 2009
Line 134: Line 134:     
The %post section of the spec file run the commands to initialise db values and create the db structure
 
The %post section of the spec file run the commands to initialise db values and create the db structure
 +
 +
===db defaults===
 +
Reserve the foo name in accounts and create default settings in configuration
 +
 +
Create files in these locations, with default values
 +
 +
root/etc/e-smith/db/accounts/defaults/foo
 +
root/etc/e-smith/db/accounts/defaults/foo/type > reserved
 +
 +
root/etc/e-smith/db/configuration/defaults/foo
 +
root/etc/e-smith/db/configuration/defaults/foo/type          > service
 +
root/etc/e-smith/db/configuration/defaults/foo/Name          > Helpdesk       
 +
root/etc/e-smith/db/configuration/defaults/foo/PublicAccess  > global-pw-remote
 +
root/etc/e-smith/db/configuration/defaults/foo/status        > enabled       
 +
root/etc/e-smith/db/configuration/defaults/foo/DbName        > foo           
 +
root/etc/e-smith/db/configuration/defaults/foo/DbUser        > foo           
 +
 +
root/etc/e-smith/templates.metadata/etc/e-smith/sql/init
 +
root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80foo  >  PERMS=0750
    
===Webserver templates===
 
===Webserver templates===
Line 245: Line 264:  
You may need to create a fragment for a system file such as crontab.
 
You may need to create a fragment for a system file such as crontab.
   −
http://mirror.contribs.org/smeserver/contribs/gordonr/devguide/html/c610.htm
+
http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual
    
===Application templates===
 
===Application templates===
Line 329: Line 348:  
   
 
   
 
  %build
 
  %build
mkdir -p                  root/etc/e-smith/db/accounts/defaults/foo
  −
echo "reserved"        > root/etc/e-smith/db/accounts/defaults/foo/type
  −
  −
mkdir -p                  root/etc/e-smith/db/configuration/defaults/foo
  −
echo "service"          > root/etc/e-smith/db/configuration/defaults/foo/type
  −
echo "Helpdesk"        > root/etc/e-smith/db/configuration/defaults/foo/Name
  −
echo "global-pw-remote" > root/etc/e-smith/db/configuration/defaults/foo/PublicAccess
  −
echo "enabled"          > root/etc/e-smith/db/configuration/defaults/foo/status
  −
echo "foo"              > root/etc/e-smith/db/configuration/defaults/foo/DbName
  −
echo "foo"              > root/etc/e-smith/db/configuration/defaults/foo/DbUser
  −
  −
mkdir -p                  root/etc/e-smith/templates.metadata/etc/e-smith/sql/init
  −
echo "PERMS=0750"      > root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/80foo
   
   
 
   
 
  %install
 
  %install
Line 357: Line 363:  
  %preun
 
  %preun
 
  %post
 
  %post
/etc/e-smith/events/actions/initialize-default-databases
  −
/sbin/e-smith/expand-template /etc/e-smith/sql/init/80foo
  −
/etc/rc.d/init.d/mysql.init start
  −
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
  −
/usr/bin/sv h /service/httpd-e-smith
  −
/sbin/e-smith/expand-template /opt/foo/config.php
  −
/sbin/e-smith/expand-template /etc/crontab
  −
  −
echo ""
  −
echo "see http://wiki.contribs.org/foo"
   
   
 
   
 
  %postun
 
  %postun

Navigation menu