[ic] Re: Interchange 5.4.2 released [SOLVED]

Toni Mueller support-ic at oeko.net
Mon Mar 19 09:40:41 EST 2007


Hi Kevin, Davor and Jon,

On Sat, 17.03.2007 at 23:25:43 +0000, Kevin Walsh <kevin at cursor.biz> 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++

-------------- next part --------------
#!/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




More information about the interchange-users mailing list