I have a service under Linux using a configuration file with a couple of database file paths. The service starts fine. In order to use the same installation procedure we have for Windows servers, I am trying to define the service with all (or most) of the required parameters placed in config files, for Linux. The ideal solution is to have a statement defined as below that is creating errors: ./dbsvc @/home/test/srvparms.txt where srvparms.txt would contain: -as -s Automatic -t Network -w SERVTEST -n LNX -c 16m -o "/home/Database/Logs/release.txt" -oe "/home/Database/Logs/rel_errolog.txt" -os 1M -x tcpip /home/Database/aaa.db -n AAA /home/Database/bbb.db -n BBB I also tried using two configuration files to have the database file paths separated from the service parameters that didn't seem to help. ./dbsvc @/home/test/srvparms.txt @/home/test/dbpath.txt where srvparms.txt would contain: -as -s Automatic -t Network -w SERVTEST -n LNX -c 16m -o "/home/Database/Logs/release.txt" -oe "/home/Database/Logs/rel_errolog.txt" -os 1M -x tcpip and the dbpath.txt file would contain only: /home/Database/aaa.db -n AAA /home/Database/bbb.db -n BBB I checked the documentation and found the text below but, I am not sure if the configuration file for all parameters is only valid on Windows environment as the only example I found is for Windows.
For Linux, can a service be defined when all parameters are setup in configuration file(s)? asked 18 Sep '12, 18:12 Derli Marcochi |
dbsvc on unix is actually a shell script. It does not appear to support the use of answered 18 Sep '12, 23:25 Graeme Perrow 1
The documentation doesn't provide enough details about the @data usage for dbsvc on Linux. However , in the link below it is suggested for "special" situations. http://dcx.sybase.com/index.html#1201/en/dbadmin/dbsvc-service-dbutilities-linux.html
(19 Sep '12, 05:52)
Derli Marcochi
|
The current behavior is that @data can be used to pass the arguments to the binary being installed as a service, but @data can not be used to encapsulate arguments to dbsvc itself on Linux. When writing a service, the command-line format is: dbsvc [creation options] -w <svc> <Details> Above, <details> can use @data. It will pass the dbsvc parsing, and the binary being installed as a service will receive the @data arguments. So, you can get closer, but not all the way there. Example: dbsvc -y -s auto -as -t Network -w SERVTEST @/home/test/dbpath.txt Hope this helps. answered 07 Nov '12, 11:51 Dan Cummins 1
We need to have the ability to apply scripts from InstallShield projects as we do with dbsrv12 for Windows servers. That's why we need the server name and the communication parameters to also be found as an external file in Linux. The workaround we are using is to manually create a text file with all of the required parameters but since this file is not used when the service starts the contents can be misleading.
(07 Nov '12, 14:38)
Derli Marcochi
In the example above is there a way to have -w <svc> included in the dbpath.txt file as well?
(12 Nov '12, 22:20)
nico
1
I don't think it is possible to add the -w switch to the @data file (at least from my attempts) however the documentation says that @data can be used for "special" situations.
(02 Dec '12, 09:06)
Derli Marcochi
|