Files
umbrix-libcore/custom/command_admin_service.go

25 lines
584 B
Go
Raw Normal View History

2024-01-29 21:55:01 +01:00
// Copyright 2015 Daniel Theophanes.
// Use of this source code is governed by a zlib-style
// license that can be found in the LICENSE file.
// simple does nothing except block while running the service.
package main
import "C"
2024-02-02 13:47:41 +01:00
import (
"fmt"
"github.com/hiddify/libcore/admin_service"
)
2024-01-29 21:55:01 +01:00
//export AdminServiceStart
2024-02-02 13:47:41 +01:00
func AdminServiceStart(arg *C.char) *C.char {
2024-01-29 21:55:01 +01:00
goArg := C.GoString(arg)
2024-02-02 13:47:41 +01:00
exitCode, outMessage := admin_service.StartService(goArg)
// Allocate memory for the message and copy the string content
return C.CString(fmt.Sprintf("%d %s", exitCode, outMessage))
2024-01-29 21:55:01 +01:00
}