Re: how to make my deamon depends on other




john_woo@xxxxxxxxxx wrote:
struggle wrote:

The further question is, all these mysql and mydeamon,other deamons
have be in a auto-installation-script. The difficalty for me is,
mysql-deamon is from mysql.org, which provides only a file.rpm, and
after installing, the mysql-deamon generated, thus I have no idea what
#id
for it in advance.

Oh , I think if you look the directory , you will find something like
mysqlDD where DD is two number . No matter how your daemon is installed
, the daemon-start file must have a self-explained name for maintance .

Yes, you r right.
let's say I got the pid of mysqld is 2400. How can I make
cat mydemond.pid = 2401?

Does this make any sense in your app that the mydaemon's pid one more
than the mysql pid ? I have no idea about how to control the system
process's pid , I think indeed it can't be controlled . If you must
need to do so , I think you should take consideration to redisign your
app .

chown didn't work in this case, b/c the app creates more than 1 log
file, and those are re-writable, namely whenever re-writes, the owner
of the log file changed back to root who is the system-starting the
deamon.

Please put what you want to do clearly here , why do the files' owner
change back to root ? I can't understand !

As mydemond and mysqld a executed by root, all ouput files from these
app a owned by
root.
I used <chown> in mydeamon script to change the owner of log file.
It's okay if the log file is not overwritten.

That's, my app will aoto rewrite log files:
if size of log1 > SIZE, it writes to log2; if .. then write to log3...
if log9... then the app
will remove all logs, and start to write to log1;
so at the second writing cycle, all logs owned by root.
You mean , although your daemon-start script chown the first batch of
log files , but your daemon , which run as root , will produce new ones
which ownship is still root .
If you want rotate logs , you can just use syslog or other log system ,
you needn't ot reinvnt the wheels .
If you must to do so , I think the only way is the change your log file
produce code in Java , to make it to process the ownship trouble .

Wish can help you !

--
John

.



Relevant Pages

  • Re: how to make my deamon depends on other
    ... No matter how your daemon is installed ... Does this make any sense in your app that the mydaemon's pid one more ... of the log file changed back to root who is the system-starting the ... I used in mydeamon script to change the owner of log file. ...
    (comp.unix.shell)
  • Re: [opensuse] Help - tmp full
    ... A log file with more then 23 GB! ... When root of file system is out of space then /tmp is useless too. ... It could be that enormous logs are result of mixed updates and factory usage. ... One can expect that default debug level of factory packages is elevated to ...
    (SuSE)
  • syslogd(8) Dropping Privs
    ... I made a quick change to syslogdso that it can drop root ... files and writing to users. ... modify your log file permissions appropriately. ... ttys generally are writeable by group tty. ...
    (FreeBSD-Security)
  • Re: Still need Help with O2k3 Admin Install
    ... If you look at the log file it appears that you're ... As for the root names question. ... filenames of the MSP and MSI files, but I get the same error message telling ... How can I patch this admin install? ...
    (microsoft.public.office.setup)
  • Log file access
    ... so if someone has the log file open in an editor when the app ... the app falls over. ... I could write to a second debug file ... first debug file open and the app starts to write to the second, ...
    (microsoft.public.vb.general.discussion)