2005-10-24 04:25:20 +02:00
|
|
|
#!@RCD_SCRIPTS_SHELL@
|
|
|
|
#
|
2006-05-07 00:38:27 +02:00
|
|
|
# $NetBSD: zss3.sh,v 1.3 2006/05/06 22:38:28 wiz Exp $
|
2005-10-24 04:25:20 +02:00
|
|
|
#
|
|
|
|
# PROVIDE: zss3
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# BEFORE: zope3
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
2006-05-07 00:38:27 +02:00
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
2005-10-24 04:25:20 +02:00
|
|
|
|
|
|
|
name="zss3"
|
|
|
|
rcvar=$name
|
|
|
|
extra_commands="status"
|
|
|
|
command="@PREFIX@/share/zope3/bin/zdctl.py"
|
|
|
|
start_cmd="zss3_start"
|
|
|
|
start_precmd="zss3_precmd"
|
|
|
|
stop_cmd="zss3_stop"
|
|
|
|
stop_precmd="zss3_precmd"
|
|
|
|
restart_cmd="zss3_restart"
|
|
|
|
restart_precmd="zss3_precmd"
|
|
|
|
status_cmd="zss3_status"
|
|
|
|
status_precmd="zss3_precmd"
|
|
|
|
zss3_instance_home="@VARBASE@/zss3"
|
|
|
|
required_dirs="${zss3_instance_home}"
|
|
|
|
command_args="--daemon --socket-name ${zss3_instance_home}/var/zdsock --program ${zss3_instance_home}/bin/runzeo"
|
|
|
|
|
|
|
|
zss3_precmd() {
|
|
|
|
for _dir in $required_dirs; do
|
|
|
|
if test ! -d "${_dir}"; then
|
|
|
|
err 1 "${_dir} is not a directory."
|
|
|
|
fi
|
|
|
|
done
|
2006-05-07 00:38:27 +02:00
|
|
|
if test -z "${zss3_user}"; then
|
|
|
|
zss3_user="@ZOPE3_USER@"
|
2005-10-24 04:25:20 +02:00
|
|
|
fi
|
2006-05-07 00:38:27 +02:00
|
|
|
command_args="${command_args} --user ${zss3_user}"
|
2005-10-24 04:25:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
zss3_start() {
|
2006-05-07 00:38:27 +02:00
|
|
|
echo -n "Starting Zope Storage Server: "
|
2005-10-24 04:25:20 +02:00
|
|
|
${command} ${rc_flags} ${command_args} start
|
|
|
|
}
|
|
|
|
|
|
|
|
zss3_stop() {
|
2006-05-07 00:38:27 +02:00
|
|
|
echo -n "Stopping Zope Storage Server: "
|
2005-10-24 04:25:20 +02:00
|
|
|
${command} ${rc_flags} ${command_args} stop
|
|
|
|
}
|
|
|
|
|
|
|
|
zss3_restart() {
|
2006-05-07 00:38:27 +02:00
|
|
|
echo -n "Restarting Zope Storage Server: "
|
2005-10-24 04:25:20 +02:00
|
|
|
${command} ${rc_flags} ${command_args} restart
|
|
|
|
}
|
|
|
|
|
|
|
|
zss3_status() {
|
|
|
|
${command} ${rc_flags} ${command_args} status
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|