Giter Club home page Giter Club logo

batchsignalmsg's Introduction

GENERAL FLOW

docker exec <Container Name> /bin/bash -c "echo '<Your Mobile Number>' > 000/00000000.txt"
docker exec <Container Name> /bin/bash -c "echo '<Message Content>' > content/<Message File Name>"
docker exec <Container Name> /bin/bash -c "wget -O content/<Attachment File Name> <Attachment Public URL>"
docker exec <Container Name> /bin/bash -c "signal-cli link -n signaladv"
docker exec -d <Container Name> /bin/bash -c "bash batch-send.sh <User> <Message File> <Attachment | Type 0 if no attachment> <3 Digits Number Set 1> <3 Digits Number Set 2> <3 Digits Number Set N> ... > msglog.txt"
crontab -l | { cat; echo "0 */6 * * * bash count-remind.sh <Container Name> <User> [<Your Mobile 1>, <Your Mobile 2>, ...] <Message Limit>"; } | crontab -

RUN FROM DOCKER HUB

docker run -d -it --name <Container Name> warching/batchsignalmsg /bin/bash

SELF BUILD

Gen Numbers

node app.js

Docker Build

docker build -t batchsignalmsg .

Docker Run

docker run -d -it --name <Container Name> batchsignalmsg /bin/bash

OPERATIONS

Update Message

docker exec <Container Name> /bin/bash -c "echo '<Message Content>' > content/<Message File Name>"

Update Attachment

docker exec <Container Name> /bin/bash -c "wget -O content/<Attachment File Name> <Attachment Public URL>"

Link Device

docker exec <Container Name> /bin/bash -c "signal-cli link -n signaladv"

Batch Send Command

docker exec -d <Container Name> /bin/bash -c "bash batch-send.sh <User> <Message File> <Attachment | Type 0 if no attachment> <3 Digits Number Set 1> <3 Digits Number Set 2> <3 Digits Number Set N> ... > msglog.txt"

Range Send Command

docker exec -d <Container Name> /bin/bash -c "bash range-send.sh <User> <Message File> <Attachment | Type 0 if no attachment> <8 Digits Starting Number> <8 Digits Ending Number> > msglog.txt"

Retrieve Data

docker exec <Container Name> /bin/bash -c "cat ../../../root/.local/share/signal-cli/data/*"

Count Recipients

docker exec <Container Name> /bin/bash -c "cat ../../../root/.local/share/signal-cli/data/*" | jq '.recipientStore.recipientStore' | jq length

Check Current Progress

docker exec <Container Name> /bin/bash -c "tail -f msglog.txt"

Get Recipient List

docker exec <Container Name> /bin/bash -c "cat ../../../root/.local/share/signal-cli/data/*" | jq '.recipientStore.recipientStore[].name' > <Container Name>-recipients.txt

Set Reminder in Every 6 Hour & Stop Container When Reach Limit

crontab -l | { cat; echo "0 */6 * * * bash count-remind.sh <Container Name> <User> [<Your Mobile 1>, <Your Mobile 2>, ...] <Message Limit>"; } | crontab -

Remove Specific Cronjob

crontab -e

batchsignalmsg's People

Contributors

somethingwentwell avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.