https://github.com/kpcyrd/sn0int-signal
https://github.com/kpcyrd/sn0int-signal
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/kpcyrd/sn0int-signal
- Owner: kpcyrd
- License: gpl-3.0
- Created: 2020-06-12T00:10:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-12T00:26:02.000Z (over 6 years ago)
- Last Synced: 2024-11-16T00:12:31.492Z (almost 2 years ago)
- Language: Rust
- Size: 24.4 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sn0int-signal
Provides a simple api for the kpcyrd/notify-signal sn0int module.
You need a second phone number to register with signal. A landline number
could work for this.
## Setup
Make sure you have [`signal-cli`](https://github.com/AsamK/signal-cli)
installed, setup, and in your path!
Afterwards install the http api like this:
git clone 'https://github.com/kpcyrd/sn0int-signal'
cd sn0int-signal
cargo install --path .
## Usage
sudo install -m 600 -o "$USER" /dev/null /etc/sn0int-signal.key
< /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 > /etc/sn0int-signal.key
sn0int-signal -k /etc/sn0int-signal.key 127.0.0.1:4321 +31337
## Testing
curl -v -H 'Content-Type: application/json' \
-H "x-signal-auth: $(cat /etc/sn0int-signal.key)" \
-d '{"to": "+313372", "body": "ohai"}' \
http://127.0.0.1:4321/api/v0/send
## Start on boot
# /etc/systemd/system/sn0int-your-other-service.service
[Unit]
Description=sn0int-signal: api for signal notifications
[Service]
User=your-user
ExecStart=/usr/local/bin/sn0int-signal -k /etc/sn0int-signal.key 127.0.0.1:4321 +31337
## License
GPLv3+