Koozali.org: home of the SME Server

database commands and signal events

Offline jdness

  • *
  • 8
  • +0/-0
    • http://www.wd9adi.com
database commands and signal events
« 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?

bmph8ter

database commands and signal events
« Reply #1 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.

Offline raem

  • *
  • 3,972
  • +4/-0
Re: database commands and signal events
« Reply #2 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...]]
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: database commands and signal events
« Reply #3 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)
...

Offline grand-pa

  • *
  • 190
  • +0/-0
    • SME Server Fr
database commands and signal events
« Reply #4 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.
SME Server v7.4 Server and gateway
Shuttle K45, Celeron E1400, 2x1Go DDR2, 2x250 Go SATA2 RAID-1

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
database commands and signal events
« Reply #5 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.

Offline grand-pa

  • *
  • 190
  • +0/-0
    • SME Server Fr
database commands and signal events
« Reply #6 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:
SME Server v7.4 Server and gateway
Shuttle K45, Celeron E1400, 2x1Go DDR2, 2x250 Go SATA2 RAID-1