Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: jdness on December 21, 2005, 05:48:53 PM

Title: database commands and signal events
Post by: jdness on December 21, 2005, 05:48:53 PM
I have been looking for a listing of the /sbin/e-smith/db command and the /sbin/e-smith/signal-event command but have not found any complete listing of what they are and what they do.  Is it posted anywhere on the site?
Title: database commands and signal events
Post by: bmph8ter on December 21, 2005, 06:38:41 PM
It looks like all the signal-events scripts are in /etc/e-smith/events.  The db stuff I'm not certain about, but I'd guess the developer docs might point you in the correct direction.
Title: Re: database commands and signal events
Post by: raem on December 22, 2005, 03:15:13 AM
jdness

The syntax is :

/sbin/e-smith/db

usage:
    /sbin/e-smith/db dbfile keys
    /sbin/e-smith/db dbfile print [key]
    /sbin/e-smith/db dbfile show [key]
    /sbin/e-smith/db dbfile get key
    /sbin/e-smith/db dbfile set key type [prop1 val1] [prop2 val2] ...
    /sbin/e-smith/db dbfile setdefault key type [prop1 val1] [prop2 val2] ...
    /sbin/e-smith/db dbfile delete key
    /sbin/e-smith/db dbfile printtype [key]
    /sbin/e-smith/db dbfile gettype key
    /sbin/e-smith/db dbfile settype key type
    /sbin/e-smith/db dbfile printprop key [prop1] [prop2] [prop3] ...
    /sbin/e-smith/db dbfile getprop key prop
    /sbin/e-smith/db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...
    /sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3] ...


/sbin/e-smith/signal-event

usage:
    /sbin/e-smith/signal-event eventname [arg1 [arg2...]]
Title: Re: database commands and signal events
Post by: raem on December 22, 2005, 03:28:51 AM
jdness

the db's in sme 6.x and earlier are in
/home/e-smith

In sme7 the db's are in

/home/e-smith/db


usage example

/sbin/e-smith/db configuration show
or
/sbin/e-smith/db show |more
or

/sbin/e-smith/db configuration show smtpfront-qmail
(relate this to the syntax usage shown earlier)

Also look at various HOWTOs for real world examples of usage.
eg
/sbin/e-smith/db configuration setprop smtpfront-qmail Patterns enabled

which can be abbreviated to

/sbin/e-smith/config setprop smtpfront-qmail Patterns enabled

In sme7 you can just use

config setprop smtpfront-qmail Patterns enabled

(although this particular example is not valid in sme 7 as it does not use smtpfront-qmail)
Title: database commands and signal events
Post by: grand-pa on March 17, 2006, 03:12:17 AM
Can anyone tell me what this option is intended to do ?
Code: [Select]
db dbfile setdefault key type [prop1 val1] [prop2 val2]I thought it would create an entry in /etc/e-smith/db/dbfile/defaults/ but it doesn't seem to do anything... :-?

Thanks in advance for your help.
Title: database commands and signal events
Post by: CharlieBrady on March 17, 2006, 04:12:09 PM
Quote from: "grand-pa"
Can anyone tell me what this option is intended to do ?
Code: [Select]
db dbfile setdefault key type [prop1 val1] [prop2 val2]


I don't know what it is intended to do. I have never used it. I think that is good evidence that you will never need it either.
Title: database commands and signal events
Post by: grand-pa on March 18, 2006, 12:17:18 AM
LOL :-D
So, I give up explainig this option in my little db documentation...

Thanks for the answer and have a good St Patrick's day with your fantastic hobbit. ;-)

Hey, barman ! Two pints for my friend and I ! :pint:  :pint:  :pint:  :pint: