Skip to content

Instantly share code, notes, and snippets.

@saml
Created June 30, 2011 21:23
Show Gist options
  • Select an option

  • Save saml/1057277 to your computer and use it in GitHub Desktop.

Select an option

Save saml/1057277 to your computer and use it in GitHub Desktop.
#!/bin/bash
if (( $# < 1 ))
then
echo "Usage: $0 bundleId [host default=localhost:4502] [cred default=admin:admin]"
echo "restarts osgi bundle using felix web console."
echo "ex, $0 org.apache.sling.scripting.jsp"
exit 1
fi
bundleId="$1"
h="${2:-localhost:4502}"
url="http://$h/system/console/bundles/$bundleId"
cred="${3:-admin:admin}"
curl -u "$cred" -F"action=stop" "$url"
curl -u "$cred" -F"action=start" "$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment