summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-07-15 17:26:08 +0200
committerChristian Pointner <equinox@spreadspace.org>2022-07-15 17:26:08 +0200
commit231d37a853d7f96ca0e6b2e780a2c95b97eace99 (patch)
tree5ff0460ac5f325afb2d17a57a07f169ec0cc9e43
parentadd ele-sms (diff)
ele-sms: add sachet
-rw-r--r--inventory/host_vars/ele-sms.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/inventory/host_vars/ele-sms.yml b/inventory/host_vars/ele-sms.yml
index c2f5317c..f65d95a2 100644
--- a/inventory/host_vars/ele-sms.yml
+++ b/inventory/host_vars/ele-sms.yml
@@ -42,6 +42,39 @@ openwrt_mixin:
/etc/htoprc:
file: "{{ global_files_dir }}/common/htoprc"
+ /etc/rc.d/S95sachet:
+ link: "../init.d/sachet"
+
+ /etc/init.d/sachet:
+ mode: "0755"
+ content: |
+ #!/bin/sh /etc/rc.common
+
+ START=95
+ USE_PROCD=1
+
+ start_service() {
+ procd_open_instance
+
+ procd_set_param command /root/sachet -config /etc/sachet.yml
+ procd_set_param respawn
+ procd_set_param stdout 1
+
+ procd_close_instance
+ }
+
+ /etc/sachet.yml:
+ content: |
+ providers:
+ smstools:
+ outgoing_dir: /var/spool/sms/outgoing
+
+ receivers:
+ - name: 'equinox'
+ provider: 'smstools'
+ to:
+ - '+436644800222'
+
/etc/usb-mode.json:
content: |
{
@@ -148,3 +181,14 @@ openwrt_uci:
prometheus_scrape_endpoint: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}:9100"
prometheus_exporters_default:
- openwrt
+
+
+### TODO:
+#
+# git clone github:spreadspace/sachet
+# git checkout topic/add-smstools
+# cd sachet/cmd/sachet
+# export GOARCH=386
+# export GO386=softfloat
+# go build -a -installsuffix cgo -mod vendor -o ../../sachet .
+# scp ../../sachet ele-sms:/root/sachet