mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-06 03:26:51 +03:00
Create /usr/bin/podkop
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-podkop
|
||||
PKG_VERSION:=0.3.22
|
||||
PKG_VERSION:=0.3.23
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LUCI_TITLE:=LuCI podkop app
|
||||
|
||||
@@ -589,7 +589,7 @@ const createModalContent = (title, content) => {
|
||||
};
|
||||
|
||||
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'));
|
||||
ui.showModal(_(title), createModalContent(title, formattedOutput));
|
||||
};
|
||||
@@ -608,7 +608,7 @@ const ButtonFactory = {
|
||||
return this.createButton({
|
||||
label: config.label,
|
||||
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()),
|
||||
style: config.style
|
||||
});
|
||||
@@ -787,7 +787,7 @@ return view.extend({
|
||||
// Additional Settings Tab (main section)
|
||||
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.rmempty = false;
|
||||
o.ucisection = 'main';
|
||||
@@ -943,7 +943,7 @@ return view.extend({
|
||||
|
||||
return new Promise(async (resolve) => {
|
||||
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}');
|
||||
|
||||
if (!singboxStatus.running) {
|
||||
@@ -991,12 +991,12 @@ return view.extend({
|
||||
system,
|
||||
fakeipStatus
|
||||
] = await Promise.all([
|
||||
safeExec('/etc/init.d/podkop', ['get_status']),
|
||||
safeExec('/etc/init.d/podkop', ['get_sing_box_status']),
|
||||
safeExec('/etc/init.d/podkop', ['show_version']),
|
||||
safeExec('/etc/init.d/podkop', ['show_luci_version']),
|
||||
safeExec('/etc/init.d/podkop', ['show_sing_box_version']),
|
||||
safeExec('/etc/init.d/podkop', ['show_system_info']),
|
||||
safeExec('/usr/bin/podkop', ['get_status']),
|
||||
safeExec('/usr/bin/podkop', ['get_sing_box_status']),
|
||||
safeExec('/usr/bin/podkop', ['show_version']),
|
||||
safeExec('/usr/bin/podkop', ['show_luci_version']),
|
||||
safeExec('/usr/bin/podkop', ['show_sing_box_version']),
|
||||
safeExec('/usr/bin/podkop', ['show_system_info']),
|
||||
checkFakeIP()
|
||||
]);
|
||||
|
||||
@@ -1039,14 +1039,14 @@ return view.extend({
|
||||
const updateStatus = async () => {
|
||||
try {
|
||||
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) {
|
||||
versionText = _('Podkop') + ' v' + version.stdout.trim();
|
||||
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 fakeipStatus = await checkFakeIP();
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
"file": {
|
||||
"/etc/init.d/podkop": [
|
||||
"exec"
|
||||
],
|
||||
"/usr/bin/podkop": [
|
||||
"exec"
|
||||
]
|
||||
},
|
||||
"ubus": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=podkop
|
||||
PKG_VERSION:=0.3.22
|
||||
PKG_VERSION:=0.3.23
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
||||
@@ -49,6 +49,9 @@ define Package/podkop/install
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(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
|
||||
|
||||
$(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