fix: fix enable/disable functionality to podkop service
This commit is contained in:
@@ -677,19 +677,12 @@ let createStatusSection = function (podkopStatus, singboxStatus, podkop, luci, s
|
|||||||
E('div', { 'class': 'table', style: 'display: flex; gap: 20px;' }, [
|
E('div', { 'class': 'table', style: 'display: flex; gap: 20px;' }, [
|
||||||
// Podkop Status Panel
|
// Podkop Status Panel
|
||||||
createStatusPanel('Podkop Status', podkopStatus, [
|
createStatusPanel('Podkop Status', podkopStatus, [
|
||||||
podkopStatus.running ?
|
ButtonFactory.createActionButton({
|
||||||
ButtonFactory.createActionButton({
|
label: podkopStatus.running ? 'Stop Podkop' : 'Start Podkop',
|
||||||
label: 'Stop Podkop',
|
type: podkopStatus.running ? 'remove' : 'apply',
|
||||||
type: 'remove',
|
action: podkopStatus.running ? 'stop' : 'start',
|
||||||
action: 'stop',
|
reload: true
|
||||||
reload: true
|
}),
|
||||||
}) :
|
|
||||||
ButtonFactory.createActionButton({
|
|
||||||
label: 'Start Podkop',
|
|
||||||
type: 'apply',
|
|
||||||
action: 'start',
|
|
||||||
reload: true
|
|
||||||
}),
|
|
||||||
ButtonFactory.createActionButton({
|
ButtonFactory.createActionButton({
|
||||||
label: 'Restart Podkop',
|
label: 'Restart Podkop',
|
||||||
type: 'apply',
|
type: 'apply',
|
||||||
|
|||||||
@@ -747,3 +747,6 @@ msgstr "не работает в браузере"
|
|||||||
|
|
||||||
msgid "not works on router"
|
msgid "not works on router"
|
||||||
msgstr "не работает на роутере"
|
msgstr "не работает на роутере"
|
||||||
|
|
||||||
|
msgid "Diagnostics"
|
||||||
|
msgstr "Диагностика"
|
||||||
@@ -1101,3 +1101,6 @@ msgstr ""
|
|||||||
|
|
||||||
msgid "not works on router"
|
msgid "not works on router"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Diagnostics"
|
||||||
|
msgstr ""
|
||||||
@@ -1965,6 +1965,18 @@ sing_box_add_secure_dns_probe_domain() {
|
|||||||
log "DNS probe domain ${domain} configured with override to port ${override_port}"
|
log "DNS probe domain ${domain} configured with override to port ${override_port}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enable() {
|
||||||
|
log "Enabling podkop service"
|
||||||
|
/etc/init.d/podkop enable
|
||||||
|
log "Podkop service enabled"
|
||||||
|
}
|
||||||
|
|
||||||
|
disable() {
|
||||||
|
log "Disabling podkop service"
|
||||||
|
/etc/init.d/podkop disable
|
||||||
|
log "Podkop service disabled"
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
@@ -1976,6 +1988,12 @@ case "$1" in
|
|||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
|
enable)
|
||||||
|
enable
|
||||||
|
;;
|
||||||
|
disable)
|
||||||
|
disable
|
||||||
|
;;
|
||||||
main)
|
main)
|
||||||
main
|
main
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user