smsresend
来自「GSM猫管理程序」· 代码 · 共 38 行
TXT
38 行
#!/bin/sh# This is an example script that you can use to resent# failed messages. The script inserts a counter in the message# file that is used to ensure that the number of retries# is limited.# The script does not need any command line arguments.failed=/var/spool/sms/failedoutgoing=/var/spool/sms/outgoingmax=5used=0notused=0cd $failedfor file in *; do if [ "$file" = "*" ]; then echo "No failed files found" exit 1 fi retry=`formail -zx Retry: < $file` if [ "$retry" ]; then retry=`expr $retry + 1` else retry=1 fi if [ $retry -gt $max ]; then notused=`expr $notused + 1` else used=`expr $used + 1` mv $file $file.old formail -f -I "Retry: $retry" < $file.old > $file mv $file $outgoing rm $file.old fidoneecho "$used messages moved again into outgoing spool directory"echo "$notused messages ignored because of to many retries"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?