diff options
author | minskim <minskim> | 2005-10-24 02:25:20 +0000 |
---|---|---|
committer | minskim <minskim> | 2005-10-24 02:25:20 +0000 |
commit | fbfcaa45f69d70b7b4e3987a089d1d792d0c8da3 (patch) | |
tree | 59461cd4b9594d95a5c1df095797a4de6ec84175 /www/zope3/files/zss3.sh | |
parent | 385fbf041f701a00dcfddb488f15a54a5b09c060 (diff) | |
download | pkgsrc-fbfcaa45f69d70b7b4e3987a089d1d792d0c8da3.tar.gz |
Import zope3 from pkgsrc-wip. Packaged by Yoshito Komatsu and
modified by me.
Zope is an open source application server for building content
management systems, intranets, portals, and custom applications.
Diffstat (limited to 'www/zope3/files/zss3.sh')
-rw-r--r-- | www/zope3/files/zss3.sh | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/www/zope3/files/zss3.sh b/www/zope3/files/zss3.sh new file mode 100644 index 00000000000..2b834d8a589 --- /dev/null +++ b/www/zope3/files/zss3.sh @@ -0,0 +1,56 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: zss3.sh,v 1.1.1.1 2005/10/24 02:25:29 minskim Exp $ +# +# PROVIDE: zss3 +# REQUIRE: DAEMON +# BEFORE: zope3 +# KEYWORD: shutdown + +$_rc_subr_loaded . /etc/rc.subr + +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 + if test "${zss3_user}"; then + command_args="${command_args} --user ${zss3_user}" + fi +} + +zss3_start() { + ${command} ${rc_flags} ${command_args} start +} + +zss3_stop() { + ${command} ${rc_flags} ${command_args} stop +} + +zss3_restart() { + ${command} ${rc_flags} ${command_args} restart +} + +zss3_status() { + ${command} ${rc_flags} ${command_args} status +} + +load_rc_config $name +run_rc_command "$1" |