feat: add compatible Trojan manager image
This commit is contained in:
@@ -48,20 +48,20 @@ func ControlMenu() {
|
||||
}
|
||||
|
||||
// Restart 重启trojan
|
||||
func Restart() {
|
||||
func Restart() error {
|
||||
util.OpenPort(core.GetConfig().LocalPort)
|
||||
util.SystemctlRestart("trojan")
|
||||
return util.SystemctlRestart("trojan")
|
||||
}
|
||||
|
||||
// Start 启动trojan
|
||||
func Start() {
|
||||
func Start() error {
|
||||
util.OpenPort(core.GetConfig().LocalPort)
|
||||
util.SystemctlStart("trojan")
|
||||
return util.SystemctlStart("trojan")
|
||||
}
|
||||
|
||||
// Stop 停止trojan
|
||||
func Stop() {
|
||||
util.SystemctlStop("trojan")
|
||||
func Stop() error {
|
||||
return util.SystemctlStop("trojan")
|
||||
}
|
||||
|
||||
// Status 获取trojan状态
|
||||
|
||||
Reference in New Issue
Block a user