push latest changes
This commit is contained in:
parent
ac2374ca92
commit
a7df1fa687
5 changed files with 15 additions and 25 deletions
26
README.md
26
README.md
|
@ -4,19 +4,6 @@
|
|||
|
||||
Ahenk-go is a Linux agent written in Go which enables Lider to manage & monitor clients remotely.
|
||||
|
||||
### Creating Docker Development Environment (Optional)
|
||||
1. Install and Create docker environment, [Quick Start](https://sulincix.github.io/sayfalar/html/docker-kullanimi.html)
|
||||
2. Pull docker image
|
||||
```sh
|
||||
docker pull asandikci/godeb
|
||||
```
|
||||
> Or alternatively build Dockerfile with `docker build -t godeb:latest` code for lower data usage
|
||||
|
||||
3. Create container from image and attach to container, an example:
|
||||
```sh
|
||||
docker run -it -d --name build1 asandikci/godeb:latest "bin/bash"
|
||||
docker attach build1 --detach-keys "ctrl-k"
|
||||
```
|
||||
## Packaging
|
||||
1. Install necessary packages (You dont need this step if you are using docker file)
|
||||
```sh
|
||||
|
@ -34,8 +21,9 @@ dpkg-buildpackage
|
|||
> Refer to Makefile for more info
|
||||
|
||||
### Documentation
|
||||
- See [Liderahenk/ahenk-docs](https://git.aliberksandikci.com.tr/Liderahenk/ahenk-docs/) for comprehensively prepared documentation.
|
||||
|
||||
- See comprehensively prepared [documentation](https://git.aliberksandikci.com.tr/Liderahenk/ahenk-docs/)
|
||||
- See how to [setup development environment](https://git.aliberksandikci.com.tr/Liderahenk/ahenk-docs/src/branch/main/dev/environment.md)
|
||||
<!-- Web Documentation Link Here -->
|
||||
|
||||
## Other Liderahenk Projects
|
||||
- [Pardus-LiderAhenk/ahenk](https://github.com/Pardus-LiderAhenk/ahenk/): Current Python Implementation of Ahenk
|
||||
|
@ -47,9 +35,11 @@ dpkg-buildpackage
|
|||
|
||||
|
||||
## Changelog
|
||||
See [changelog](./debian/changelog) to learn what have been changed between releases or refer to [Releases](./releases) Tab above
|
||||
|
||||
- [ahenk-docs/admin/changelog](https://git.aliberksandikci.com.tr/Liderahenk/ahenk-docs/src/branch/main/admin/changelog.md): changes between releases with easy-to-understand annotations
|
||||
- [ahenk-docs/dev/changelog](https://git.aliberksandikci.com.tr/Liderahenk/ahenk-docs/src/branch/main/dev/changelog.md): detailed development changelog, includes all issues, feature implementations, breaking changes, code comments, todo etc. - **long**
|
||||
- [debian/changelog](./debian/changelog): changes between debian releases
|
||||
<!-- https://doc.liderahenk.org/ahenk/changelog/ -->
|
||||
|
||||
## License
|
||||
Lider Ahenk and its sub projects are licensed under the [LGPL v3](./LICENSE).
|
||||
Liderahenk and its sub projects are licensed under the [LGPL v3](./LICENSE).
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"git.aliberksandikci.com.tr/Liderahenk/ahenk-go/pkg/utils"
|
||||
|
||||
|
@ -56,10 +55,6 @@ func main() {
|
|||
f := utils.OpenLogFile(LogFile)
|
||||
defer f.Close()
|
||||
log.SetOutput(f)
|
||||
log.Printf("Log test")
|
||||
|
||||
time.Sleep(10 * time.Second)
|
||||
log.Print("Killed")
|
||||
case "tmptest":
|
||||
log.Print("TEMPORARY TEST STARTED, log files are NOT redirecting!")
|
||||
}
|
||||
|
|
|
@ -10,10 +10,15 @@ type Resources interface {
|
|||
AgentInfo() map[string]interface{}
|
||||
}
|
||||
|
||||
// type NewPluginInterface interface {
|
||||
// PluginMethod() returnType
|
||||
// }
|
||||
|
||||
// Loads Plugins and runs them.
|
||||
// When you create a new plugin create a new interface and call this plugin in this function
|
||||
func PluginManager() {
|
||||
var resources Resources = LoadPlugin("resources").(Resources)
|
||||
// var pluginName NewPluginInterface = LoadPlugin("pluginName").(NewPluginInterface)
|
||||
for {
|
||||
logPlugin("AgentInfo", resources.AgentInfo())
|
||||
time.Sleep(30 * time.Second)
|
||||
|
|
|
@ -19,11 +19,11 @@ func LoadPlugin(plugName string) interface{} {
|
|||
utils.Check(err)
|
||||
|
||||
// TODO also allow lookup another symbol other than PlugnameConnect
|
||||
symGreeter, err := plug.Lookup(utils.FirstUpperEN(plugName) + "Connect")
|
||||
symPlug, err := plug.Lookup(utils.FirstUpperEN(plugName) + "Connect")
|
||||
utils.Check(err)
|
||||
|
||||
var plugOut interface{}
|
||||
plugOut, ok := symGreeter.(interface{})
|
||||
plugOut, ok := symPlug.(interface{})
|
||||
if !ok {
|
||||
fmt.Println("unexpected type from module symbol")
|
||||
os.Exit(1)
|
||||
|
|
Loading…
Reference in a new issue