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;' }, [
|
||||
// Podkop Status Panel
|
||||
createStatusPanel('Podkop Status', podkopStatus, [
|
||||
podkopStatus.running ?
|
||||
ButtonFactory.createActionButton({
|
||||
label: 'Stop Podkop',
|
||||
type: 'remove',
|
||||
action: 'stop',
|
||||
reload: true
|
||||
}) :
|
||||
ButtonFactory.createActionButton({
|
||||
label: 'Start Podkop',
|
||||
type: 'apply',
|
||||
action: 'start',
|
||||
reload: true
|
||||
}),
|
||||
ButtonFactory.createActionButton({
|
||||
label: podkopStatus.running ? 'Stop Podkop' : 'Start Podkop',
|
||||
type: podkopStatus.running ? 'remove' : 'apply',
|
||||
action: podkopStatus.running ? 'stop' : 'start',
|
||||
reload: true
|
||||
}),
|
||||
ButtonFactory.createActionButton({
|
||||
label: 'Restart Podkop',
|
||||
type: 'apply',
|
||||
|
||||
@@ -746,4 +746,7 @@ msgid "not works in browser"
|
||||
msgstr "не работает в браузере"
|
||||
|
||||
msgid "not works on router"
|
||||
msgstr "не работает на роутере"
|
||||
msgstr "не работает на роутере"
|
||||
|
||||
msgid "Diagnostics"
|
||||
msgstr "Диагностика"
|
||||
@@ -1100,4 +1100,7 @@ msgid "not works in browser"
|
||||
msgstr ""
|
||||
|
||||
msgid "not works on router"
|
||||
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}"
|
||||
}
|
||||
|
||||
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
|
||||
start)
|
||||
start
|
||||
@@ -1976,6 +1988,12 @@ case "$1" in
|
||||
stop
|
||||
start
|
||||
;;
|
||||
enable)
|
||||
enable
|
||||
;;
|
||||
disable)
|
||||
disable
|
||||
;;
|
||||
main)
|
||||
main
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user