v 0.0.3:
Add support for other distribution (Fedora, SuSE, Gentoo, RedHat) (I only tested with debian, please make backups if you have other distro)
Default variables are read from ispcp.conf.
maillogconvert.pl it`s updated too.
Other little tweaks.
PLEASE TEST BEFORE ADD TO WIKI. WORKS FOR ME BUT... you know
TODO:
Still ispcp.conf it`s not modified.
echo "#### COPYING /parts DIRECTORIES ####" bla=`find ${INST_PREF}/etc/ispcp -type d -name 'parts'`; for x in $bla; do bla2=`echo ${x} | awk -F"${INST_PREF}|/parts" '{print $2}'` cp -R $x $bla2 done
echo "#### REBUILDING SITES ####" if [ $REBUILD_SITES == "yes" ] ; then # Some old releases require this. not necessary for current ones. #DELETE FROM config WHERE name = 'DATABASE_REVISION'; #read -p "Enter mysql pasword on prompt" cat <<EOF | mysql -uroot -pYOURPASSWORD ispcp UPDATE mail_users SET status='toadd' where status='ok'; UPDATE domain SET domain_status = 'change' WHERE domain_status = 'ok'; UPDATE domain_aliasses SET alias_status = 'change' WHERE alias_status = 'ok'; UPDATE subdomain SET subdomain_status = 'change' WHERE subdomain_status = 'ok'; EOF ${ROOT_DIR}/engine/ispcp-rqst-mngr fi
It works for me on Debian . Only the litte Error happens "Stopping ispCP GUI-Backend communication Daemon: ispcp_daemon/sbin/start-stop-daemon: warning: failed to kill 11258: No such process" so i think, we should stop the daemon a second time.
OS : Debian 4.0 Etch 64bit
ispCP Version : 1.0.0 r1335 - 27.08.08 (NightlyBuild)
Activated : AWStats dynamic
Mods : update via NightlyUpdateScript
It`s suposed to be faster since i moved removing of .svn dirs in a single block. Also it`s kind of optimised (not so good with bash scripting but i learn fast )
This post was last modified: 06-03-2008 01:21 AM by sci2tech.
"Stopping ispCP GUI-Backend communication Daemon: ispcp_daemon/sbin/start-stop-daemon: warning: failed to kill 11258: No such process"
I have the same error, but the daemon gets stopped properly. It's probably a problem with the start/stop script (like trying to stop twice).
I might be debian-etch related (since I know sci2tech is using lenny).
I haven't looked in it since it "kind of works".
ispcomm.
Tested on 3 computers (but all with lenny) and still can`t reproduce. Could be etch related but i`ve doubt
Tested on 3 computers (but all with lenny) and still can`t reproduce. Could be etch related but i`ve doubt
It's not related to your script. If I issue
Code:
/etc/init.d/ispcp_daemon stop
I get the error, but the daemon stops "properly". I haven't looked into this because of time. Will look at it asap. In the mean time, that error is only "cosmetic" and does not affect the functions of the script.
I did understand that it`s not related to my script
problem is generated from: /etc/init.d/ispcp_daemon
Quote:
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
killproc -p $PID $DAEMON
log_end_msg $?
[ ! -f "$PID" ] || rm -f $PID
;;
and /lib/lsb/init-function
Quote:
killproc () {
local pidfile sig status base i name_param is_term_sig
pidfile=
name_param=
is_term_sig=no
OPTIND=1
while getopts p: opt ; do
case "$opt" in
p) pidfile="$OPTARG";;
esac
done
shift $(($OPTIND - 1))
base=${1##*/}
if [ ! $pidfile ]; then
pidfile=/var/run/$base.pid
name_param="--name $base"
fi
sig=$(echo ${2:-} | sed -e 's/^-\(.*\)/\1/')
sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/')
if [ -n "$sig" -o "$sig" = 15 -o "$sig" = TERM ]; then
is_term_sig=yes
fi
status=0
if [ ! "$is_term_sig" = yes ]; then
if [ -n "$sig" ]; then
/sbin/start-stop-daemon --stop --signal "$sig" --pidfile "$pidfile" --quiet $name_param || status="$?"
else
/sbin/start-stop-daemon --stop --pidfile "$pidfile" --quiet $name_param || status="$?"
fi
else
/sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet --oknodo $name_param || status="$?"
fi
if [ "$status" = 1 ]; then
if [ -n "$sig" ]; then
return 0
fi
return 0 # program is not running
fi
if [ "$status" = 0 -a "$is_term_sig" = yes ]; then
pidofproc -p $pidfile "$1" >/dev/null || rm -f "$pidfile"
fi
return 0
}