[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] Re: Interchange 5.4.2 released [SOLVED]


Hi Kevin, Davor and Jon,

On Sat, 17.03.2007 at 23:25:43 +0000, Kevin Walsh <suppressed> wrote:
> It might be helpful to post your cooked-up init script.  Perhaps you
> need to use "su -" instead of "su" in there to read the Interchange
> user's environment.

first off, I'd like to thank you all. The problem is solved. But since
I changed two items at once - the init script and lib/Vend/Config.pm, I
can't say for sure which one was the deciding factor. My guess goes to
the init script.

Anyway, I attached the init script for your perusal - it works with the
standard chroot'ed OpenBSD Apache web server.


Best,
--Toni++

#!/bin/sh

# start/stop/restart Interchange

set -x

SU=/usr/bin/su

icpath=/usr/local/lib/interchange-5.4.2
bin=${icpath}/bin
etc=${icpath}/etc
daemon=${bin}/interchange

USER=_interchange

test -x $daemon || exit 0

case "$1" in
restart|start)
	if [ -s ${icpath}/etc/interchange.pid ]; then
		kill `cat ${icpath}/etc/interchange.pid`
		sleep 2
	fi
	if [ ! -d /var/www/var/run/interchange ]; then
		mkdir -p /var/www/var/run/interchange
	fi
	$SU - $USER -c "${daemon} --start"
	chown -R _interchange:www /var/www/var/run/interchange
	chmod -R g+rw /var/www/var/run/interchange
	echo -n ' interchange'
	;;
reconfig)
	shop=$2
	$SU - ${USER} -c "${daemon} --reconfig=${shop}"
	;;
stop)
	if [ -S ${icpath}/etc/socket ] || [ -S ${icpath}/etc/socket.ipc ]; then
		$SU - ${USER} -c "${daemon} --stop"
		rm -f ${etc}/*.pid
	fi
	;;
*)
	echo "Usage: $0 {start|restart|stop}, or $0 reconfig=<shopname>"
	exit 2
	;;
esac


_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.