update 2022-12-27 23:35:50

This commit is contained in:
github-actions[bot] 2022-12-27 23:35:50 +08:00
parent 78dc9ed4bf
commit 15a79aee8b
13 changed files with 615 additions and 615 deletions

View File

@ -1,19 +1,19 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-lucky
PKG_VERSION:=1.0.4
PKG_RELEASE:=4
LUCI_TITLE:=LuCI Support for Dynamic lucky Client
LUCI_DEPENDS:=+lucky
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-lucky
PKG_VERSION:=1.0.4
PKG_RELEASE:=4
LUCI_TITLE:=LuCI Support for Dynamic lucky Client
LUCI_DEPENDS:=+lucky
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -1,179 +1,179 @@
### 访问数:[![](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)] [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
欢迎来到sirpdboy的源码仓库
=
# Lucky(大吉)
luci-app-lucky 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理
[![若部分图片无法正常显示,请挂上机场浏览或点这里到末尾看修复教程](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)](#解决-github-网页上图片显示失败的问题) [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
[luci-app-lucky Lucky(大吉)](https://github.com/sirpdboy/luci-app-lucky)
======================
**认真阅读完毕** 本页面,本页面包含注意事项和如何使用。
## 功能说明:
### Lucky(大吉)
#### 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理
#### 在LUCI中可以配置访问端口和增加是否允许外网访问设置。
<!-- TOC -->
- [lucky](#lucky)
- [特性](#特性)
- [使用方法](#使用方法)
- [说明](#说明)
- [问题](#常见问题)
- [界面](#界面)
- [捐助](#捐助)
<!-- /TOC -->
## 特性
- 目前已经实现的功能有
- 1.替代socat,主要用于公网IPv6 tcp/udp转 内网ipv4
- 支持界面化(web后台)管理转发规则,单条转发规则支持设置多个转发端口,一键开关指定转发规则
- 单条规则支持黑白名单安全模式切换,白名单模式可以让没有安全验证的内网服务端口稍微安全一丢丢暴露到公网
- Web后台支持查看最新100条日志
- 另有精简版不带后台,支持命令行快捷设置转发规则,有利于空间有限的嵌入式设备运行.(不再提供编译版本,如有需求可以自己编译)
- 2.动态域名服务
- 参考和部分代码来自 https://github.com/jeessy2/ddns-go
- 在ddns-go的基础上主要改进/增加的功能有
- 1.同时支持接入多个不同的DNS服务商
- 2.支持http/https/socks5代理设置
- 3.自定义(Callback)和Webhook支持自定义headers
- 4.支持BasicAuth
- 5.DDNS任务列表即可了解全部信息(包含错误信息),无需单独查看日志.
- 6.调用DNS服务商接口更新域名信息前可以先通过DNS解析域名比较IP,减少对服务商接口调用.
- 其它细节功能自己慢慢发现...
- 没有文档,后台各处的提示信息已经足够多.
- 支持的DNS服务商和DDNS-GO一样,有Alidns(阿里云),百度云,Cloudflare,Dnspod(腾讯云),华为云.自定义(Callback)内置有每步,No-IP,Dynv6,Dynu模版,一键填充,仅需修改相应用户密码或者token即可快速接入.
- 3.http/https反向代理
- 特点
- 设置简单
- 支持HttpBasic认证
- 支持IP黑白名单
- 支持UserAgent黑白名单
- 日志记录最近访问情况
- 一键开关子规则
- 前端域名与后端地址 支持一对一,一对多(均衡负载),多对多(下一级反向代理)
- 4.网络唤醒
- 特点
- 支持远程控制唤醒和关机操作
- 远程唤醒需要 待唤醒端所在局域网内有开启中继唤醒指令的lucky唤醒客户端
- 远程关机需要 待关机端运行有luck唤醒客户端
- 支持接入第三方物联网平台(点灯科技 巴法云),可通过各大平台的语音助手控制设备唤醒和关机.
- 点灯科技支持 小爱同学 小度 天猫精灵
- 巴法云支持小爱同学 小度 天猫精灵 google语音 AmazonAlexa
- 具备但一般用不上的功能:支持一个设备设置多组网卡mac和多个广播地址,实现批量控制设备.
## 使用方法
- 将luci-app-lucky添加至 LEDE/OpenWRT 源码的方法。
### 下载源码方法一:
- 编辑源码文件夹根目录feeds.conf.default并加入如下内容:
```Brach
# feeds获取源码
src-git luci-app-lucky https://github.com/sirpdboy/luci-app-lucky
```
```Brach
# 更新feeds并安装主题
scripts/feeds update luci-app-lucky
scripts/feeds install luci-app-lucky
```
### 下载源码方法二:
```Brach
# 下载源码
git clone https://github.com/sirpdboy/luci-app-lucky.git package/lucky
make menuconfig
```
### 配置菜单
```Brach
make menuconfig
# 找到 LuCI -> Applications, 选择 luci-app-lucky, 保存后退出。
```
### 编译
```Brach
# 编译固件
make package/lucky/luci-app-lucky/compile V=s
```
## 说明
- 源码来源https://github.com/gdy666/lucky
- 源码来源https://github.com/sirpdboy/luci-app-lucky
- 你可以随意使用其中的源码,但请注明出处。
## 常见问题
- 不同于防火墙端口转发规则,不要设置没有用上的端口,会增加内存的使用.
- 小米路由 ipv4 类型的80和443端口被占用,但只设置监听tcp6(ipv6)的80/443端口转发规则完全没问题.
- 如果需要使用白名单模式,请根据自身需求打开外网访问后台管理页面开关.
- 转发规则启用异常,端口转发没有生效时请登录后台查看日志.
- 开启外网访问可以直接修改配置文件中的"AllowInternetaccess": false, 将false改为true
## 界面
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/lucky1.jpg)
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/lucky2.jpg)
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/lucky3.jpg)
# My other project
网络速度测试 https://github.com/sirpdboy/NetSpeedTest
定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
DDNS-GO动态域名: https://github.com/sirpdboy/luci-app-DDNS-GO
Lucky(大吉): https://github.com/sirpdboy/luci-app-lucky
## 捐助
-如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~**
-你们的支持就是我的动力!**
| <img src="https://img.shields.io/badge/-支付宝-F5F5F5.svg" href="#赞助支持本项目-" height="25" alt="图飞了😂"/> | <img src="https://img.shields.io/badge/-微信-F5F5F5.svg" height="25" alt="图飞了😂" href="#赞助支持本项目-"/> |
| :-----------------: | :-------------: |
|![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/支付宝.png) | ![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/微信.png) |
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
</a>
### 访问数:[![](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)] [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
欢迎来到sirpdboy的源码仓库
=
# Lucky(大吉)
luci-app-lucky 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理
[![若部分图片无法正常显示,请挂上机场浏览或点这里到末尾看修复教程](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)](#解决-github-网页上图片显示失败的问题) [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
[luci-app-lucky Lucky(大吉)](https://github.com/sirpdboy/luci-app-lucky)
======================
**认真阅读完毕** 本页面,本页面包含注意事项和如何使用。
## 功能说明:
### Lucky(大吉)
#### 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理
#### 在LUCI中可以配置访问端口和增加是否允许外网访问设置。
<!-- TOC -->
- [lucky](#lucky)
- [特性](#特性)
- [使用方法](#使用方法)
- [说明](#说明)
- [问题](#常见问题)
- [界面](#界面)
- [捐助](#捐助)
<!-- /TOC -->
## 特性
- 目前已经实现的功能有
- 1.替代socat,主要用于公网IPv6 tcp/udp转 内网ipv4
- 支持界面化(web后台)管理转发规则,单条转发规则支持设置多个转发端口,一键开关指定转发规则
- 单条规则支持黑白名单安全模式切换,白名单模式可以让没有安全验证的内网服务端口稍微安全一丢丢暴露到公网
- Web后台支持查看最新100条日志
- 另有精简版不带后台,支持命令行快捷设置转发规则,有利于空间有限的嵌入式设备运行.(不再提供编译版本,如有需求可以自己编译)
- 2.动态域名服务
- 参考和部分代码来自 https://github.com/jeessy2/ddns-go
- 在ddns-go的基础上主要改进/增加的功能有
- 1.同时支持接入多个不同的DNS服务商
- 2.支持http/https/socks5代理设置
- 3.自定义(Callback)和Webhook支持自定义headers
- 4.支持BasicAuth
- 5.DDNS任务列表即可了解全部信息(包含错误信息),无需单独查看日志.
- 6.调用DNS服务商接口更新域名信息前可以先通过DNS解析域名比较IP,减少对服务商接口调用.
- 其它细节功能自己慢慢发现...
- 没有文档,后台各处的提示信息已经足够多.
- 支持的DNS服务商和DDNS-GO一样,有Alidns(阿里云),百度云,Cloudflare,Dnspod(腾讯云),华为云.自定义(Callback)内置有每步,No-IP,Dynv6,Dynu模版,一键填充,仅需修改相应用户密码或者token即可快速接入.
- 3.http/https反向代理
- 特点
- 设置简单
- 支持HttpBasic认证
- 支持IP黑白名单
- 支持UserAgent黑白名单
- 日志记录最近访问情况
- 一键开关子规则
- 前端域名与后端地址 支持一对一,一对多(均衡负载),多对多(下一级反向代理)
- 4.网络唤醒
- 特点
- 支持远程控制唤醒和关机操作
- 远程唤醒需要 待唤醒端所在局域网内有开启中继唤醒指令的lucky唤醒客户端
- 远程关机需要 待关机端运行有luck唤醒客户端
- 支持接入第三方物联网平台(点灯科技 巴法云),可通过各大平台的语音助手控制设备唤醒和关机.
- 点灯科技支持 小爱同学 小度 天猫精灵
- 巴法云支持小爱同学 小度 天猫精灵 google语音 AmazonAlexa
- 具备但一般用不上的功能:支持一个设备设置多组网卡mac和多个广播地址,实现批量控制设备.
## 使用方法
- 将luci-app-lucky添加至 LEDE/OpenWRT 源码的方法。
### 下载源码方法一:
- 编辑源码文件夹根目录feeds.conf.default并加入如下内容:
```Brach
# feeds获取源码
src-git luci-app-lucky https://github.com/sirpdboy/luci-app-lucky
```
```Brach
# 更新feeds并安装主题
scripts/feeds update luci-app-lucky
scripts/feeds install luci-app-lucky
```
### 下载源码方法二:
```Brach
# 下载源码
git clone https://github.com/sirpdboy/luci-app-lucky.git package/lucky
make menuconfig
```
### 配置菜单
```Brach
make menuconfig
# 找到 LuCI -> Applications, 选择 luci-app-lucky, 保存后退出。
```
### 编译
```Brach
# 编译固件
make package/lucky/luci-app-lucky/compile V=s
```
## 说明
- 源码来源https://github.com/gdy666/lucky
- 源码来源https://github.com/sirpdboy/luci-app-lucky
- 你可以随意使用其中的源码,但请注明出处。
## 常见问题
- 不同于防火墙端口转发规则,不要设置没有用上的端口,会增加内存的使用.
- 小米路由 ipv4 类型的80和443端口被占用,但只设置监听tcp6(ipv6)的80/443端口转发规则完全没问题.
- 如果需要使用白名单模式,请根据自身需求打开外网访问后台管理页面开关.
- 转发规则启用异常,端口转发没有生效时请登录后台查看日志.
- 开启外网访问可以直接修改配置文件中的"AllowInternetaccess": false, 将false改为true
## 界面
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/lucky1.jpg)
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/lucky2.jpg)
![screenshots](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/lucky3.jpg)
# My other project
网络速度测试 https://github.com/sirpdboy/NetSpeedTest
定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
DDNS-GO动态域名: https://github.com/sirpdboy/luci-app-DDNS-GO
Lucky(大吉): https://github.com/sirpdboy/luci-app-lucky
## 捐助
-如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~**
-你们的支持就是我的动力!**
| <img src="https://img.shields.io/badge/-支付宝-F5F5F5.svg" href="#赞助支持本项目-" height="25" alt="图飞了😂"/> | <img src="https://img.shields.io/badge/-微信-F5F5F5.svg" height="25" alt="图飞了😂" href="#赞助支持本项目-"/> |
| :-----------------: | :-------------: |
|![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/支付宝.png) | ![xm1](https://raw.githubusercontent.com/sirpdboy/openwrt/master/doc/微信.png) |
<a href="#readme">
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
</a>

View File

@ -1,32 +1,32 @@
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.lucky", package.seeall)
function index()
entry({"admin", "services", "lucky"}, alias("admin", "services", "lucky", "setting"),_("Lucky"), 57).dependent = true
entry({"admin", "services", "lucky", "setting"}, cbi("lucky"), _("Base Setting"), 20).leaf=true
entry({"admin", "services", "lucky", "lucky"}, template("lucky"), _("Lucky"), 30).leaf = true
entry({"admin", "services", "lucky", "lucky_admin"}, call("lucky_admin")).leaf = true
entry({"admin", "services", "lucky_status"}, call("act_status"))
end
function act_status()
local uci = require 'luci.model.uci'.cursor()
local port = tonumber(uci:get_first("lucky", "lucky", "port"))
local e = { }
e.running = luci.sys.call("pidof lucky >/dev/null") == 0
e.port = (port or 16601)
e.safeurl = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
function lucky_admin()
local e = { }
e.username = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminAccount | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
e.password = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminPassword | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
-- Licensed to the public under the Apache License 2.0.
module("luci.controller.lucky", package.seeall)
function index()
entry({"admin", "services", "lucky"}, alias("admin", "services", "lucky", "setting"),_("Lucky"), 57).dependent = true
entry({"admin", "services", "lucky", "setting"}, cbi("lucky"), _("Base Setting"), 20).leaf=true
entry({"admin", "services", "lucky", "lucky"}, template("lucky"), _("Lucky"), 30).leaf = true
entry({"admin", "services", "lucky", "lucky_admin"}, call("lucky_admin")).leaf = true
entry({"admin", "services", "lucky_status"}, call("act_status"))
end
function act_status()
local uci = require 'luci.model.uci'.cursor()
local port = tonumber(uci:get_first("lucky", "lucky", "port"))
local e = { }
e.running = luci.sys.call("pidof lucky >/dev/null") == 0
e.port = (port or 16601)
e.safeurl = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
function lucky_admin()
local e = { }
e.username = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminAccount | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
e.password = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminPassword | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -1,34 +1,34 @@
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
local m, s ,o
m = Map("lucky")
m.title = translate("Lucky")
m.description = translate("Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp")..translate("</br>For specific usage, see:")..translate("<a href=\'https://github.com/sirpdboy/luci-app-lucky.git' target=\'_blank\'>GitHub @sirpdboy/luci-app-lucky </a>。")
m:section(SimpleSection).template = "lucky_status"
s = m:section(TypedSection, "lucky", translate("Global Settings"))
s.addremove=false
s.anonymous=true
o = s:option(Flag,"enabled",translate("Enable"))
o.default=0
o = s:option(Value, "port",translate("Set the Lucky access port"))
o.datatype = "uinteger"
o.default = 16601
o = s:option(Flag, "AllowInternetaccess", translate("Enable Internet access"))
o.default=0
o = s:option(Button, "lucky_admin", translate("View Password"))
o.rawhtml = true
o.template = "lucky_admin"
m.apply_on_parse = true
m.on_after_apply = function(self,map)
luci.sys.exec("/etc/init.d/lucky restart")
end
return m
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
local m, s ,o
m = Map("lucky")
m.title = translate("Lucky")
m.description = translate("Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp")..translate("</br>For specific usage, see:")..translate("<a href=\'https://github.com/sirpdboy/luci-app-lucky.git' target=\'_blank\'>GitHub @sirpdboy/luci-app-lucky </a>。")
m:section(SimpleSection).template = "lucky_status"
s = m:section(TypedSection, "lucky", translate("Global Settings"))
s.addremove=false
s.anonymous=true
o = s:option(Flag,"enabled",translate("Enable"))
o.default=0
o = s:option(Value, "port",translate("Set the Lucky access port"))
o.datatype = "uinteger"
o.default = 16601
o = s:option(Flag, "AllowInternetaccess", translate("Enable Internet access"))
o.default=0
o = s:option(Button, "lucky_admin", translate("View Password"))
o.rawhtml = true
o.template = "lucky_admin"
m.apply_on_parse = true
m.on_after_apply = function(self,map)
luci.sys.exec("/etc/init.d/lucky restart")
end
return m

View File

@ -1,37 +1,37 @@
<%#
Copyright 2021-2022 sirpdboy Wich <herboy2008@gmail.com>
https://github.com/sirpdboy/luci-app-lucky
Licensed to the public under the Apache License 2.0.
-%>
<%
local safeURL = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed 's/\"//g' | sed 's/: /\\n/g'|sed '1d' ");
local luckyHttpPort = luci.model.uci.cursor():get("lucky", "lucky", "port");
-%>
<%+header%>
<div class="cbi-map">
<iframe id="lucky" style="width: 100%; min-height: 780px; border: none; border-radius: .375rem;box-shadow: rgba(0, 0, 0, 0.75) 0px 0px 15px -5px;"><br/><em style=\"color:red\">
<p ><em><%:The Lucky service is not running.%></em></p>
</iframe>
</div>
<script type="text/javascript">
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ `<%=luckyHttpPort%>`+`<%=safeURL%>`;
document.getElementById("lucky").src = luckyAdminURL
document.getElementById("lucky").height = document.documentElement.clientHeight;
window.onresize = function(){
document.getElementById("lucky").height = document.documentElement.clientHeight;
}
</script>
<%+footer%>
<%#
Copyright 2021-2022 sirpdboy Wich <sirpdboy@qq.com>
https://github.com/sirpdboy/luci-app-lucky
Licensed to the public under the Apache License 2.0.
-%>
<%
local safeURL = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
local luckyHttpPort = luci.model.uci.cursor():get("lucky", "lucky", "port");
-%>
<%+header%>
<div class="cbi-map">
<iframe id="lucky" style="width: 100%; min-height: 780px; border: none; border-radius: .375rem;box-shadow: rgba(0, 0, 0, 0.75) 0px 0px 15px -5px;"><br/><em style=\"color:red\">
<p ><em><%:The Lucky service is not running.%></em></p>
</iframe>
</div>
<script type="text/javascript">
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ `<%=luckyHttpPort%>`+`<%=safeURL%>`;
document.getElementById("lucky").src = luckyAdminURL
document.getElementById("lucky").height = document.documentElement.clientHeight;
window.onresize = function(){
document.getElementById("lucky").height = document.documentElement.clientHeight;
}
</script>
<%+footer%>

View File

@ -1,26 +1,26 @@
<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
function admin_info(btn)
{
btn.disabled = true;
btn.value = '<%:Reading...%>';
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "lucky", "lucky_admin")%>',
null,
function(x,d)
{
var tb = document.getElementById('<%=self.option%>-status');
if (tb)
{
tb.innerHTML = "<%:Username:%>" + "<font color='green'>" + d.username + "</font>";
tb.innerHTML += "<%:Password:%>" + "<font color='green'>" + d.password + "</font>";
}
btn.disabled = false;
btn.value = '<%:Read%>';
}
);
return false;
}
//]]></script>
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Read%>" onclick="return admin_info(this)" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
function admin_info(btn)
{
btn.disabled = true;
btn.value = '<%:Reading...%>';
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "lucky", "lucky_admin")%>',
null,
function(x,d)
{
var tb = document.getElementById('<%=self.option%>-status');
if (tb)
{
tb.innerHTML = "<%:Username:%>" + "<font color='green'>" + d.username + "</font>";
tb.innerHTML += "<%:Password:%>" + "<font color='green'>" + d.password + "</font>";
}
btn.disabled = false;
btn.value = '<%:Read%>';
}
);
return false;
}
//]]></script>
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Read%>" onclick="return admin_info(this)" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
<%+cbi/valuefooter%>

View File

@ -1,35 +1,35 @@
<%#
Copyright 2021-2022 sirpdboy Wich <herboy2008@gmail.com>
https://github.com/sirpdboy/luci-app-lucky
Licensed to the public under the Apache License 2.0.
-%>
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[lucky_status]])%>', null,
function(x, d) {
var tb = document.getElementById('lucky_status');
if (d && tb)
{
if (d.running)
{
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ d.port+d.safeurl+"";
tb.innerHTML = '<em><b style=\"color:green\"><%:The Lucky service is running.%></b></em>'
+ '<em> <br/><br/>' + ' <b > <%:Click the new page to open Lucky%> <a href="' +luckyAdminURL+'"'+' target="_blank">' + luckyAdminURL + ' </a> </b> <br/> </em>'
}
else
{
tb.innerHTML = '<em><b style=\"color:red\"><%:The Lucky service is not running.%></b></em>';
}
}
}
);
//]]></script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<legend><%:Lucky Status%></legend>
<p id="lucky_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
<%#
Copyright 2021-2022 sirpdboy Wich <herboy2008@gmail.com>
https://github.com/sirpdboy/luci-app-lucky
Licensed to the public under the Apache License 2.0.
-%>
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[lucky_status]])%>', null,
function(x, d) {
var tb = document.getElementById('lucky_status');
if (d && tb)
{
if (d.running)
{
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ d.port+d.safeurl+"";
tb.innerHTML = '<em><b style=\"color:green\"><%:The Lucky service is running.%></b></em>'
+ '<em> <br/><br/>' + ' <b > <%:Click the new page to open Lucky%> <a href="' +luckyAdminURL+'"'+' target="_blank">' + luckyAdminURL + ' </a> </b> <br/> </em>'
}
else
{
tb.innerHTML = '<em><b style=\"color:red\"><%:The Lucky service is not running.%></b></em>';
}
}
}
);
//]]></script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<legend><%:Lucky Status%></legend>
<p id="lucky_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -1,56 +1,56 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Lucky"
msgstr "Lucky大吉"
msgid "Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp"
msgstr "大吉主要功能动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理网络唤醒(可通过第三方物联网平台接入各大语音助手实现语音控制开关电脑)"
msgid "Running state"
msgstr "运行状态"
msgid "The Lucky service is running."
msgstr "大吉服务已启动"
msgid "The Lucky service is not running."
msgstr "大吉服务未启动"
msgid "Lucky Status"
msgstr "大吉服务状态"
msgid "Collecting data..."
msgstr "收集数据..."
msgid "Set the Lucky access port"
msgstr "设置访问端口"
msgid "Lucky configuration file"
msgstr "Lucky 配置文件"
msgid "</br>For specific usage, see:"
msgstr "</br>具体使用方法参见:"
msgid "Base Setting"
msgstr "基本设置"
msgid "Enable Internet access"
msgstr "开启外网访问"
msgid "Click the new page to open Lucky"
msgstr "点击新页面打开大吉"
msgid "View Password"
msgstr "查看密码"
msgid "Username:"
msgstr "用户名:"
msgid "Password:"
msgstr "密码:"
msgid "Reading..."
msgstr "读取中..."
msgid "Read"
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Lucky"
msgstr "Lucky大吉"
msgid "Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp"
msgstr "大吉主要功能动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理网络唤醒(可通过第三方物联网平台接入各大语音助手实现语音控制开关电脑)"
msgid "Running state"
msgstr "运行状态"
msgid "The Lucky service is running."
msgstr "大吉服务已启动"
msgid "The Lucky service is not running."
msgstr "大吉服务未启动"
msgid "Lucky Status"
msgstr "大吉服务状态"
msgid "Collecting data..."
msgstr "收集数据..."
msgid "Set the Lucky access port"
msgstr "设置访问端口"
msgid "Lucky configuration file"
msgstr "Lucky 配置文件"
msgid "</br>For specific usage, see:"
msgstr "</br>具体使用方法参见:"
msgid "Base Setting"
msgstr "基本设置"
msgid "Enable Internet access"
msgstr "开启外网访问"
msgid "Click the new page to open Lucky"
msgstr "点击新页面打开大吉"
msgid "View Password"
msgstr "查看密码"
msgid "Username:"
msgstr "用户名:"
msgid "Password:"
msgstr "密码:"
msgid "Reading..."
msgstr "读取中..."
msgid "Read"
msgstr "读取"

View File

@ -1,5 +1,5 @@
config lucky 'lucky'
option enabled '0'
option logger '1'
option port '16601'
option AllowInternetaccess '0'
config lucky 'lucky'
option enabled '0'
option logger '1'
option port '16601'
option AllowInternetaccess '0'

View File

@ -1,11 +1,11 @@
{
"luci-app-lucky": {
"description": "Grant UCI access for luci-app-lucky",
"read": {
"uci": [ "lucky" ]
},
"write": {
"uci": [ "lucky" ]
}
}
}
{
"luci-app-lucky": {
"description": "Grant UCI access for luci-app-lucky",
"read": {
"uci": [ "lucky" ]
},
"write": {
"uci": [ "lucky" ]
}
}
}

View File

@ -1,86 +1,86 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=lucky
PKG_VERSION:=1.7.5
PKG_RELEASE:=1
PKGARCH:=all
ifeq ($(ARCH),mipsel)
LUCKY_ARCH:=mipsle_softfloat
endif
ifeq ($(ARCH),mips)
LUCKY_ARCH:=mips_softfloat
endif
ifeq ($(ARCH),i386)
LUCKY_ARCH:=i386
endif
ifeq ($(ARCH),x86_64)
LUCKY_ARCH:=x86_64
endif
ifeq ($(ARCH),arm)
LUCKY_ARCH:=armv7
endif
ifeq ($(BOARD),bcm53xx)
LUCKY_ARCH:=armv6
ifeq ($(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))),)
LUCKY_ARCH:=armv5
endif
endif
ifeq ($(BOARD),kirkwood)
LUCKY_ARCH:=armv5
endif
ifeq ($(ARCH),aarch64)
LUCKY_ARCH:=arm64
endif
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=GDY666 <gdy666@foxmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=Lucky dynamic domain name ddns-go service, socat,frp
DEPENDS:=@(i386||x86_64||arm||aarch64||mipsel||mips)
URL:=https://github.com/gdy666/lucky
endef
define Package/$(PKG_NAME)/description
Main functions of Lucky: dynamic domain name ddns-go service, socat,reverse proxy ,wake on lan
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
[ -f /etc/uci-defaults/luci-lucky ] && /etc/uci-defaults/luci-lucky && rm -f /etc/uci-defaults/luci-lucky
fi
endef
define Build/Prepare
[ ! -f $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz ] && wget https://github.com/gdy666/lucky/releases/download/v$(PKG_VERSION)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz -O $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz
tar -xzvf $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz -C $(PKG_BUILD_DIR)
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lucky $(1)/usr/bin/lucky
$(INSTALL_BIN) ./files/lucky.init $(1)/etc/init.d/lucky
$(INSTALL_BIN) ./files/luci-lucky.uci-default $(1)/etc/uci-defaults/luci-lucky
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=lucky
PKG_VERSION:=1.7.5
PKG_RELEASE:=1
PKGARCH:=all
ifeq ($(ARCH),mipsel)
LUCKY_ARCH:=mipsle_softfloat
endif
ifeq ($(ARCH),mips)
LUCKY_ARCH:=mips_softfloat
endif
ifeq ($(ARCH),i386)
LUCKY_ARCH:=i386
endif
ifeq ($(ARCH),x86_64)
LUCKY_ARCH:=x86_64
endif
ifeq ($(ARCH),arm)
LUCKY_ARCH:=armv7
endif
ifeq ($(BOARD),bcm53xx)
LUCKY_ARCH:=armv6
ifeq ($(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))),)
LUCKY_ARCH:=armv5
endif
endif
ifeq ($(BOARD),kirkwood)
LUCKY_ARCH:=armv5
endif
ifeq ($(ARCH),aarch64)
LUCKY_ARCH:=arm64
endif
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=GDY666 <gdy666@foxmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=Lucky dynamic domain name ddns-go service, socat,frp
DEPENDS:=@(i386||x86_64||arm||aarch64||mipsel||mips)
URL:=https://github.com/gdy666/lucky
endef
define Package/$(PKG_NAME)/description
Main functions of Lucky: dynamic domain name ddns-go service, socat,reverse proxy ,wake on lan
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
[ -f /etc/uci-defaults/luci-lucky ] && /etc/uci-defaults/luci-lucky && rm -f /etc/uci-defaults/luci-lucky
fi
endef
define Build/Prepare
[ ! -f $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz ] && wget https://github.com/gdy666/lucky/releases/download/v$(PKG_VERSION)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz -O $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz
tar -xzvf $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz -C $(PKG_BUILD_DIR)
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lucky $(1)/usr/bin/lucky
$(INSTALL_BIN) ./files/lucky.init $(1)/etc/init.d/lucky
$(INSTALL_BIN) ./files/luci-lucky.uci-default $(1)/etc/uci-defaults/luci-lucky
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -1,11 +1,11 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@lucky[-1]
add ucitrack lucky
set ucitrack.@lucky[-1].init=lucky
commit ucitrack
EOF
rm -rf /tmp/luci*
exit 0
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@lucky[-1]
add ucitrack lucky
set ucitrack.@lucky[-1].init=lucky
commit ucitrack
EOF
rm -rf /tmp/luci*
exit 0

View File

@ -1,86 +1,86 @@
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
#
# This file is part of lucky .
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
USE_PROCD=1
START=99
STOP=15
CONF=lucky
PROG=/usr/bin/lucky
LUCKYDIR=/etc/lucky
LUCKYCONF=$LUCKYDIR/lucky.conf
get_config() {
config_get_bool enabled $1 enabled 1
config_get_bool logger $1 logger 1
config_get port $1 port 16601
config_get AllowInternetaccess $1 AllowInternetaccess 0
}
set_firewall() {
if [ "x$AllowInternetaccess" == "x1" ]; then
uci -q delete firewall.lucky
uci set firewall.lucky=rule
uci set firewall.lucky.name="lucky"
uci set firewall.lucky.target="ACCEPT"
uci set firewall.lucky.src="wan"
uci set firewall.lucky.proto='tcp udp'
uci set firewall.lucky.dest_port="$port"
uci set firewall.lucky.enabled="1"
uci commit firewall
/etc/init.d/firewall reload >/dev/null 2>&1
else
uci -q delete firewall.lucky
uci commit firewall
/etc/init.d/firewall reload >/dev/null 2>&1
fi
}
start_service() {
stop_service
config_load "$CONF"
config_foreach get_config "$CONF"
[ -s ${LUCKYCONF} ] || {
[ -d "$LUCKYDIR" ] || mkdir -p "$LUCKYDIR" >/dev/null 2>&1
cat > $LUCKYCONF <<EOF
{"BaseConfigure": {"AdminWebListenPort": $port,"AdminWebListenTLS": false,"AdminWebListenHttpsPort": 16626,"AdminAccount": "666","AdminPassword": "666","AllowInternetaccess": false,"LogMaxSize": 2048,"HttpClientTimeout": 20,"InsecureSkipVerify": false,"DisableModules": null,"SafeURL": ""},"WhiteListConfigure": {"BaseConfigure": {"URL": "","ActivelifeDuration": 36,"BasicAccount": "666","BasicPassword": "666"},"WhiteList": null},"BlackListConfigure": {"BlackList": null},"DDNSConfigure": {"Enable": false,"FirstCheckDelay": 0,"Intervals": 0},"DDNSTaskList": null,"ReverseProxyRuleList": null,"SSLCertficateList": null,"PortForwardsRuleList": null,"PortForwardsConfigure": {"PortForwardsLimit": 128,"TCPPortforwardMaxConnections": 1024,"UDPReadTargetDataMaxgoroutineCount": 1024},"WOLDeviceList": null,"WOLServiceConfigure": {"Server": {"Enable": false,"Token": "666666" },"Client": {"Enable": false,"ServerURL": "","Token": "","Relay": false,"Key": "","DeviceName": "OpenWrt","Mac": "","BroadcastIP": "","Port": 9,"Repeat": 5,"PowerOffCMD": "poweroff","UpdateTime": 0}}}
EOF
}
[ "x$enabled" = "x1" ] || return 1
if [ "x$AllowInternetaccess" = "x1" ] ;then
sed -i 's/"AllowInternetaccess": false,/"AllowInternetaccess": true,/g' "$LUCKYCONF"
else
sed -i 's/"AllowInternetaccess": true,/"AllowInternetaccess": false,/g' "$LUCKYCONF"
fi
# set_firewall
procd_open_instance
procd_set_param command "$PROG"
procd_append_param command -c "$LUCKYCONF" -p $port
[ "x$logger" == x1 ] && procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
}
stop_service() {
killall -9 "$PROG" >/dev/null 2>&1
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "$CONF"
}
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
#
# This file is part of lucky .
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
USE_PROCD=1
START=99
STOP=15
CONF=lucky
PROG=/usr/bin/lucky
LUCKYDIR=/etc/lucky
LUCKYCONF=$LUCKYDIR/lucky.conf
get_config() {
config_get_bool enabled $1 enabled 1
config_get_bool logger $1 logger 1
config_get port $1 port 16601
config_get AllowInternetaccess $1 AllowInternetaccess 0
}
set_firewall() {
if [ "x$AllowInternetaccess" == "x1" ]; then
uci -q delete firewall.lucky
uci set firewall.lucky=rule
uci set firewall.lucky.name="lucky"
uci set firewall.lucky.target="ACCEPT"
uci set firewall.lucky.src="wan"
uci set firewall.lucky.proto='tcp udp'
uci set firewall.lucky.dest_port="$port"
uci set firewall.lucky.enabled="1"
uci commit firewall
/etc/init.d/firewall reload >/dev/null 2>&1
else
uci -q delete firewall.lucky
uci commit firewall
/etc/init.d/firewall reload >/dev/null 2>&1
fi
}
start_service() {
stop_service
config_load "$CONF"
config_foreach get_config "$CONF"
[ -s ${LUCKYCONF} ] || {
[ -d "$LUCKYDIR" ] || mkdir -p "$LUCKYDIR" >/dev/null 2>&1
cat > $LUCKYCONF <<EOF
{"BaseConfigure": {"AdminWebListenPort": $port,"AdminWebListenTLS": false,"AdminWebListenHttpsPort": 16626,"AdminAccount": "666","AdminPassword": "666","AllowInternetaccess": false,"LogMaxSize": 2048,"HttpClientTimeout": 20,"InsecureSkipVerify": false,"DisableModules": null,"SafeURL": ""},"WhiteListConfigure": {"BaseConfigure": {"URL": "","ActivelifeDuration": 36,"BasicAccount": "666","BasicPassword": "666"},"WhiteList": null},"BlackListConfigure": {"BlackList": null},"DDNSConfigure": {"Enable": false,"FirstCheckDelay": 0,"Intervals": 0},"DDNSTaskList": null,"ReverseProxyRuleList": null,"SSLCertficateList": null,"PortForwardsRuleList": null,"PortForwardsConfigure": {"PortForwardsLimit": 128,"TCPPortforwardMaxConnections": 1024,"UDPReadTargetDataMaxgoroutineCount": 1024},"WOLDeviceList": null,"WOLServiceConfigure": {"Server": {"Enable": false,"Token": "666666" },"Client": {"Enable": false,"ServerURL": "","Token": "","Relay": false,"Key": "","DeviceName": "OpenWrt","Mac": "","BroadcastIP": "","Port": 9,"Repeat": 5,"PowerOffCMD": "poweroff","UpdateTime": 0}}}
EOF
}
[ "x$enabled" = "x1" ] || return 1
if [ "x$AllowInternetaccess" = "x1" ] ;then
sed -i 's/"AllowInternetaccess": false,/"AllowInternetaccess": true,/g' "$LUCKYCONF"
else
sed -i 's/"AllowInternetaccess": true,/"AllowInternetaccess": false,/g' "$LUCKYCONF"
fi
# set_firewall
procd_open_instance
procd_set_param command "$PROG"
procd_append_param command -c "$LUCKYCONF" -p $port
[ "x$logger" == x1 ] && procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
}
stop_service() {
killall -9 "$PROG" >/dev/null 2>&1
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "$CONF"
}