svn commit: r766216 - /ofbiz/trunk/debian/ofbiz-framework.postinst

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r766216 - /ofbiz/trunk/debian/ofbiz-framework.postinst

doogie-3
Author: doogie
Date: Sat Apr 18 05:31:45 2009
New Revision: 766216

URL: http://svn.apache.org/viewvc?rev=766216&view=rev
Log:
Combine start_ofbiz and stop_ofbiz.

Modified:
    ofbiz/trunk/debian/ofbiz-framework.postinst

Modified: ofbiz/trunk/debian/ofbiz-framework.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.postinst?rev=766216&r1=766215&r2=766216&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-framework.postinst Sat Apr 18 05:31:45 2009
@@ -150,21 +150,12 @@
  exit 1
  fi
 }
-start_ofbiz() {
+ofbiz_init_invoke() {
  if [ -x "/etc/init.d/ofbiz" ]; then
  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d ofbiz start || exit $?
+ invoke-rc.d ofbiz $1 || exit $?
  else
- /etc/init.d/ofbiz start || exit $?
- fi
- fi
-}
-stop_ofbiz() {
- if [ -x "/etc/init.d/ofbiz" ]; then
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d ofbiz stop || exit $?
- else
- /etc/init.d/ofbiz stop || exit $?
+ /etc/init.d/ofbiz $1 || exit $?
  fi
  fi
 }
@@ -186,7 +177,7 @@
  for trigger in $2; do
  case "$trigger" in
  (ofbiz-start)
- start_ofbiz
+ ofbiz_init_invoke start
  ;;
  (ofbiz-install|ofbiz-upgrade)
  ofbiz_reseed=""
@@ -202,7 +193,7 @@
  fi
  ofbiz_readers="$(fix_readers "$ofbiz_readers")"
  get ofbiz_admin_port ofbiz/admin-port
- stop_ofbiz
+ ofbiz_init_invoke stop
  if [ "z" != "z$ofbiz_reseed" ]; then
  echo "Need to modify ofbiz data." 1>&2
  configure_ofbiz