Added script (#2)
Reviewed-on: phoenix/twilio_sender#2 Co-authored-by: kdeng00 <kundeng00@pm.me> Co-committed-by: kdeng00 <kundeng00@pm.me>
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
/twilio_sender
|
||||||
|
/messages
|
||||||
|
/numbers
|
||||||
|
/twilio_details.json
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
root_dir=`pwd`
|
||||||
|
|
||||||
|
echo "Root directory: $root_dir"
|
||||||
|
|
||||||
|
if [[ ! -d "$root_dir" ]]; then
|
||||||
|
echo "Root directory does not exist. Exiting"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
config_path="twilio_details.json"
|
||||||
|
numbers_part="0"
|
||||||
|
numbers_path="numbers/numbers-$numbers_part.json"
|
||||||
|
type_message="json"
|
||||||
|
messages_path="messages/message-$numbers_part.json"
|
||||||
|
send_message="True"
|
||||||
|
|
||||||
|
echo "Changing directory to $root_dir"
|
||||||
|
cd $root_dir
|
||||||
|
|
||||||
|
./twilio_sender "$config_path" "$numbers_path" "$messages_path"
|
||||||
|
|
||||||
|
echo "Done"
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"account_sid": "account_sid",
|
|
||||||
"service_sid": "service_sid",
|
|
||||||
"auth_token": "auth_token",
|
|
||||||
"number": "0123456789"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"account_sid": "somethingspecial243324",
|
||||||
|
"service_sid": "FEWJ93982N3FD9JV3F8",
|
||||||
|
"auth_token": "sdfdsmfoi3299823je98d29jd",
|
||||||
|
"phone_number": "+10123456789"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user