diff --git a/README.md b/README.md index e808397..6bc7551 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ To invert the TXD pin on the FTDI device, programming the EEPROM is needed. With ### Commmon Distributions -Make shure the device is recocntied as ttyUSB after plug in with `dmesg`.
-Edit the alarm.sh with your device name, like `/dev/ttyUSB0`.
-Run `bash ./alarm.sh` for starting the alarm.
+Make sure the device is after plug in recognized as ttyUSB with `dmesg`.
+Edit the alert.sh with your device name, like `/dev/ttyUSB0`.
+Run `bash ./alert.sh` for starting the alarm.
### openWrt @@ -38,7 +38,31 @@ Run `bash ./alarm.sh` for starting the alarm.
Make shure the device is recocntied as ttyUSB after plug in with `dmesg`.
Edit the alarm.sh with your device name, like `/dev/ttyUSB0`.
-Run `bash ./alarm.sh` for starting the alarm.
+Run `bash ./alert.sh` for starting the alarm.
### Service -todo \ No newline at end of file +`nano /etc/init.d/alarm` + +``` +#!/bin/sh /etc/rc.common + +START=99 + +restart() { +bash /root/alert.sh > /dev/null 2>&1 & +bash /root/alert.sh start > /dev/null 2>&1 & +} + +start() { +bash /root/alert.sh start > /dev/null 2>&1 & +} + +stop() { +bash /root/alert.sh > /dev/null 2>&1 & +} +``` +`chmod +x /etc/init.d/alarm` + +`/etc/init.d/alarm start` + +`/etc/init.d/alarm stop` \ No newline at end of file