-
Notifications
You must be signed in to change notification settings - Fork 1
/
request_quota
executable file
·49 lines (35 loc) · 1.17 KB
/
request_quota
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
# Tool to request a quota increase and email rc-support.
set -e
# Get the cluster name.
cluster=$(whereami)
echo "This will create a quota request on ${cluster^} for $USER."
echo ""
echo "What is the total quota limit you wish your account to have? (Eg. 500G, 1.5T)"
read -r quota_amount
echo ""
echo "What is the reason for your request? (The enter key submits your text)"
read -r reason
echo ""
echo "Here is a summary of your quota request.
The request is for: $USER on ${cluster^}
for total quota amount of: $quota_amount
Reason for request: $reason
If these values are correct, press 'y' to proceed, or any other key to exit.
"
read -r -n 1 prompt_result
if [[ "$prompt_result" != "y" ]]; then exit; fi
echo ""
# request is being sent, email rc-support.
# Use the noreply address as source to avoid ticket loops in RemedyForce.
echo "Emailing [email protected] with this request."
/usr/sbin/sendmail -t<<EOF
From: [email protected]
Subject: Quota request for ${USER} on ${cluster^}
${USER} on ${cluster}
requests a total quota amount of
${quota_amount}
Reason:
${reason}
EOF