hcrond...
So litle program and so more problems and bugzzzz
Columns gid and uid use Names of user and names of groups, not gid/uid!
Column "machine" is ignored.
Column "andor" can crash job.
But the table have a column "lastrun". Looks nice. We can use it for control of Jobs exucutabling.
During compilation i lost 3-4 hours becouse information about needed preinstalled packes is absent or wrong! -
In new mysqld we do not need libmysqlclient-devel, we need mysql-devel !
And we need "lex" in PATH or properly installed "flex" pacage.
I rewrite Makefile for x64 systems whith lines
CFLAGS=-std=c99 -Wall -W
LDFLAGS= -I'/usr/include/mysql' -L/usr/lib64/mysql -lmysqlclient -ldaemon -lpthread
And I rewrite ./init.d/hcrond for chkconfig
Code:
#!/bin/bash
# hcrond Startup script for the hcrond
#
# chkconfig: - 90 12
# description: Startup script for hcrond
# processname: hcrond
# config: /etc/hcrondrc
# pidfile: /var/run/hcrond.pid
# Source function library.
. /etc/rc.d/init.d/functions
test -f /usr/bin/hcrond || exit 0
. /lib/lsb/init-functions
pidfile=/var/run/hcrond.pid
lockfile=${LOCKFILE-/var/lock/hcrond}
## TODO get from /etc/hcrondrc
case "$1" in
start)
echo -n "Starting hcrond..."
daemon hcrond
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
;;
stop)
echo -n "Stopping hcrond..."
killproc hcrond
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
;;
restart)
echo -n "ReStarting hcrond..."
killproc hcrond
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
daemon hcrond
echo
[ $RETVAL = 0 ] && touch ${lockfile}
;;
reload|force-reload)
echo -n "Reloading configuration files for hcrond..."
# cron reloads automatically
echo $?
;;
*) echo "Usage: /etc/init.d/hcrond {start|stop|restart|reload|force-reload}"
exit 1
;;
esac
exit 0
Its worked.
Now I asked my Cooder to do litle add in main.c to posibility use column "activ" for compatibiliti for ispCP templates.
So more truble
I do not know can I (whith my Home-Bear) to drink so lot of Russian Vodka for solving this problems or we have a risc to meet a doctors