mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 22:05:13 +08:00
✨ Sync 2026-08-13 21:00:03
This commit is contained in:
1 parent
c57dcedc98
commit
29133c66a8
48 files changed
+1339
-1967
No files matched your search
@@ -13,7 +13,6 @@ import { connect } from 'ubus';
|
||||
import { cursor } from 'uci';
|
||||
|
||||
import { urldecode, urlencode } from 'luci.http';
|
||||
import { init_action } from 'luci.sys';
|
||||
import { remove_subscription_nodes } from '/etc/homeproxy/scripts/node_references.uc';
|
||||
import { parse_surge_subscription } from '/etc/homeproxy/scripts/subscription_parsers.uc';
|
||||
|
||||
@@ -216,6 +215,10 @@ function apply_tls_cert_pin_policy(config, label, pin) {
|
||||
version));
|
||||
}
|
||||
|
||||
function service_action(action) {
|
||||
return system([ '/etc/init.d/homeproxy', action ]);
|
||||
}
|
||||
|
||||
function parse_uri(uri) {
|
||||
let config, url, params;
|
||||
|
||||
@@ -857,8 +860,8 @@ function main() {
|
||||
|
||||
if (need_restart) {
|
||||
log('Restarting service...');
|
||||
init_action('homeproxy', 'stop');
|
||||
init_action('homeproxy', 'start');
|
||||
service_action('stop');
|
||||
service_action('start');
|
||||
}
|
||||
|
||||
log(sprintf('%s nodes added, %s updated, %s removed.', added, updated, removed));
|
||||
@@ -885,8 +888,8 @@ if (!isEmpty(subscription_urls)) {
|
||||
'请查看 HomeProxy 日志中的 [SUBSCRIBE] 记录并修复订阅配置');
|
||||
|
||||
log('Restarting service...');
|
||||
init_action('homeproxy', 'stop');
|
||||
init_action('homeproxy', 'start');
|
||||
service_action('stop');
|
||||
service_action('start');
|
||||
writeSubscriptionUpdateStatus(false, true, false, status_error);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user