mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-08 12:36:50 +03:00
Create /usr/bin/podkop
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-podkop
|
PKG_NAME:=luci-app-podkop
|
||||||
PKG_VERSION:=0.3.22
|
PKG_VERSION:=0.3.23
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI podkop app
|
LUCI_TITLE:=LuCI podkop app
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ const createModalContent = (title, content) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const showConfigModal = async (command, title) => {
|
const showConfigModal = async (command, title) => {
|
||||||
const res = await safeExec('/etc/init.d/podkop', [command]);
|
const res = await safeExec('/usr/bin/podkop', [command]);
|
||||||
const formattedOutput = formatDiagnosticOutput(res.stdout || _('No output'));
|
const formattedOutput = formatDiagnosticOutput(res.stdout || _('No output'));
|
||||||
ui.showModal(_(title), createModalContent(title, formattedOutput));
|
ui.showModal(_(title), createModalContent(title, formattedOutput));
|
||||||
};
|
};
|
||||||
@@ -608,7 +608,7 @@ const ButtonFactory = {
|
|||||||
return this.createButton({
|
return this.createButton({
|
||||||
label: config.label,
|
label: config.label,
|
||||||
additionalClass: `cbi-button-${config.type || ''}`,
|
additionalClass: `cbi-button-${config.type || ''}`,
|
||||||
onClick: () => safeExec('/etc/init.d/podkop', [config.action])
|
onClick: () => safeExec('/usr/bin/podkop', [config.action])
|
||||||
.then(() => config.reload && location.reload()),
|
.then(() => config.reload && location.reload()),
|
||||||
style: config.style
|
style: config.style
|
||||||
});
|
});
|
||||||
@@ -787,7 +787,7 @@ return view.extend({
|
|||||||
// Additional Settings Tab (main section)
|
// Additional Settings Tab (main section)
|
||||||
let o = mainSection.tab('additional', _('Additional Settings'));
|
let o = mainSection.tab('additional', _('Additional Settings'));
|
||||||
|
|
||||||
o = mainSection.taboption('additional', form.Flag, 'yacd', _('Yacd enable'), _('http://openwrt.lan:9090/ui'));
|
o = mainSection.taboption('additional', form.Flag, 'yacd', _('Yacd enable'), _('<a href="http://openwrt.lan:9090/ui" target="_blank">openwrt.lan:9090/ui</a>'));
|
||||||
o.default = '0';
|
o.default = '0';
|
||||||
o.rmempty = false;
|
o.rmempty = false;
|
||||||
o.ucisection = 'main';
|
o.ucisection = 'main';
|
||||||
@@ -943,7 +943,7 @@ return view.extend({
|
|||||||
|
|
||||||
return new Promise(async (resolve) => {
|
return new Promise(async (resolve) => {
|
||||||
try {
|
try {
|
||||||
const singboxStatusResult = await safeExec('/etc/init.d/podkop', ['get_sing_box_status']);
|
const singboxStatusResult = await safeExec('/usr/bin/podkop', ['get_sing_box_status']);
|
||||||
const singboxStatus = JSON.parse(singboxStatusResult.stdout || '{"running":0,"dns_configured":0}');
|
const singboxStatus = JSON.parse(singboxStatusResult.stdout || '{"running":0,"dns_configured":0}');
|
||||||
|
|
||||||
if (!singboxStatus.running) {
|
if (!singboxStatus.running) {
|
||||||
@@ -991,12 +991,12 @@ return view.extend({
|
|||||||
system,
|
system,
|
||||||
fakeipStatus
|
fakeipStatus
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
safeExec('/etc/init.d/podkop', ['get_status']),
|
safeExec('/usr/bin/podkop', ['get_status']),
|
||||||
safeExec('/etc/init.d/podkop', ['get_sing_box_status']),
|
safeExec('/usr/bin/podkop', ['get_sing_box_status']),
|
||||||
safeExec('/etc/init.d/podkop', ['show_version']),
|
safeExec('/usr/bin/podkop', ['show_version']),
|
||||||
safeExec('/etc/init.d/podkop', ['show_luci_version']),
|
safeExec('/usr/bin/podkop', ['show_luci_version']),
|
||||||
safeExec('/etc/init.d/podkop', ['show_sing_box_version']),
|
safeExec('/usr/bin/podkop', ['show_sing_box_version']),
|
||||||
safeExec('/etc/init.d/podkop', ['show_system_info']),
|
safeExec('/usr/bin/podkop', ['show_system_info']),
|
||||||
checkFakeIP()
|
checkFakeIP()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -1039,14 +1039,14 @@ return view.extend({
|
|||||||
const updateStatus = async () => {
|
const updateStatus = async () => {
|
||||||
try {
|
try {
|
||||||
if (!versionReceived) {
|
if (!versionReceived) {
|
||||||
const version = await safeExec('/etc/init.d/podkop', ['show_version'], 2000);
|
const version = await safeExec('/usr/bin/podkop', ['show_version'], 2000);
|
||||||
if (version.stdout) {
|
if (version.stdout) {
|
||||||
versionText = _('Podkop') + ' v' + version.stdout.trim();
|
versionText = _('Podkop') + ' v' + version.stdout.trim();
|
||||||
versionReceived = true;
|
versionReceived = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const singboxStatusResult = await safeExec('/etc/init.d/podkop', ['get_sing_box_status']);
|
const singboxStatusResult = await safeExec('/usr/bin/podkop', ['get_sing_box_status']);
|
||||||
const singboxStatus = JSON.parse(singboxStatusResult.stdout || '{"running":0,"dns_configured":0}');
|
const singboxStatus = JSON.parse(singboxStatusResult.stdout || '{"running":0,"dns_configured":0}');
|
||||||
const fakeipStatus = await checkFakeIP();
|
const fakeipStatus = await checkFakeIP();
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
"file": {
|
"file": {
|
||||||
"/etc/init.d/podkop": [
|
"/etc/init.d/podkop": [
|
||||||
"exec"
|
"exec"
|
||||||
|
],
|
||||||
|
"/usr/bin/podkop": [
|
||||||
|
"exec"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ubus": {
|
"ubus": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=podkop
|
PKG_NAME:=podkop
|
||||||
PKG_VERSION:=0.3.22
|
PKG_VERSION:=0.3.23
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
||||||
@@ -49,6 +49,9 @@ define Package/podkop/install
|
|||||||
|
|
||||||
$(INSTALL_DIR) $(1)/etc/config
|
$(INSTALL_DIR) $(1)/etc/config
|
||||||
$(INSTALL_CONF) ./files/etc/config/podkop $(1)/etc/config/podkop
|
$(INSTALL_CONF) ./files/etc/config/podkop $(1)/etc/config/podkop
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) ./files/usr/bin/podkop $(1)/usr/bin/podkop
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,podkop))
|
$(eval $(call BuildPackage,podkop))
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1848
podkop/files/usr/bin/podkop
Executable file
1848
podkop/files/usr/bin/podkop
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user