Skip to content

Commit

Permalink
Added setup init and configure for mongodb.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Oct 19, 2011
1 parent baf8da8 commit 9bc681a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
9 changes: 0 additions & 9 deletions mongodb/bin/setup

This file was deleted.

2 changes: 2 additions & 0 deletions mongodb/map
@@ -1,2 +1,4 @@
backup=mongodb_backup()
setup=setup
setup init=mongodb_setup_init()
configure=mongodb_configure()
32 changes: 19 additions & 13 deletions mongodb/shell/functions
Expand Up @@ -45,12 +45,8 @@ mongodb_install()

mongodb_postinstall()
{
if path exists "${install_base_path}"
then
return 0
else
activate_package "${package_name}" "${package_version}"
fi
if ! path exists "${install_base_path}"
then activate_package "${package_name}" "${package_version}" ; fi
}

mongodb_set_architecture()
Expand All @@ -65,7 +61,8 @@ mongodb_set_architecture()
;;

(*)
if [[ "$action" = *install ]] ; then
if [[ "$action" = *install ]]
then
fail "Unhandled architecture: $HOSTTYPE for ${extension} ${action}"
fi
;;
Expand All @@ -78,18 +75,14 @@ mongodb_set_os()
(*linux*)
os="linux"
;;

(*darwin*)
os="osx"
;;

(*solaris*)
os="sunos5"
if [[ "$architecture" = "i686" ]] ; then
architecture="i86pc" # C'mon Solaris, really???
fi
if [[ "$architecture" = "i686" ]]
then architecture="i86pc" ; fi # C'mon Solaris, really???
;;

(*)
if [[ "$action" = *install ]] ; then
fail "Unhandled operating system: $MACHTYPE for ${extension} ${action}"
Expand All @@ -102,3 +95,16 @@ mongodb_backup()
{
true # TODO: Implement this
}

mongodb_setup_init()
{
template install "mongodb/init.d" to "${init_scripts_path}"
files chmod a+x "${init_scripts_path}/${extension}"
}

mongodb_configure()
{
template install "mongodb.conf" \
to "${init_scripts_path}/${extension}/${extension}.conf"
}

0 comments on commit 9bc681a

Please sign in to comment.