summaryrefslogtreecommitdiff
path: root/inventory
diff options
context:
space:
mode:
Diffstat (limited to 'inventory')
-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