-
Notifications
You must be signed in to change notification settings - Fork 4
/
myhero-uninstall.sh
executable file
·23 lines (18 loc) · 1.1 KB
/
myhero-uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/bash
[ -z "$MANTL_CONTROL" ] && echo "Please run 'source myhero_setup' to set Environment Variables" && exit 1;
[ -z "$MANTL_USER" ] && echo "Please run 'source myhero_setup' to set Environment Variables" && exit 1;
[ -z "$MANTL_PASSWORD" ] && echo "Please run 'source myhero_setup' to set Environment Variables" && exit 1;
[ -z "$MANTL_DOMAIN" ] && echo "Please run 'source myhero_setup' to set Environment Variables" && exit 1;
[ -z "$DEPLOYMENT_NAME" ] && echo "Please run 'source myhero_setup' to set Environment Variables" && exit 1;
echo Removing Web Service
curl -k -X DELETE -u $MANTL_USER:$MANTL_PASSWORD https://$MANTL_CONTROL:$MANTL_PORT/marathon/v2/apps/$DEPLOYMENT_NAME/web \
-H "Content-type: application/json"
echo
echo Removing App Service
curl -k -X DELETE -u $MANTL_USER:$MANTL_PASSWORD https://$MANTL_CONTROL:$MANTL_PORT/marathon/v2/apps/$DEPLOYMENT_NAME/app \
-H "Content-type: application/json"
echo
echo Removing Data Service
curl -k -X DELETE -u $MANTL_USER:$MANTL_PASSWORD https://$MANTL_CONTROL:$MANTL_PORT/marathon/v2/apps/$DEPLOYMENT_NAME/data \
-H "Content-type: application/json"
echo