Created
June 30, 2011 21:23
-
-
Save saml/1057277 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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