daemon

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 7 Imported by: 0

README

DAEMON

Install app as system service [support Linux, Darwin and Windows]

Precompiled files in /build

daemon-darwin-amd64
daemon-windows-amd64
daemon-linux-amd64
daemon-linux-386
daemon-linux-arm64
daemon-linux-arm32

How to use

  1. Compile program according to the os-arch system.
  2. Copy the compiled file into your project package and rename to "daemon".
  3. Run cmd "sudo ./daemon [install/remove/start/stop/restart/status] [app name]"to manage process
for example
├─{your-project-folder}
│  ├─configs    //cofig folder
│  ├─logs       //log folder
│  ├─assets     //assets folderr
│  ├─myapp      //executable file
│  └─daemon    //daemon file compiled and copy from this package
!important daemon and app must in a same folder.

run cmd

//enter {your-project-folder}
cd ./{your-project-folder}

sudo ./daemon install myapp [arg1] [arg2] ...
sudo ./daemon start myapp
sudo ./daemon status myapp
sudo ./daemon restart myapp
sudo ./daemon stop myapp
sudo ./daemon remove myapp
in the test folder there are test apps for different architecture
example you can run on arm64 op-system
sudo ./daemon install app_test-linux-arm64
or run on arm32(armv6,armv7,etc..) op-system
sudo ./daemon install app_test-linux-arm32

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package daemon v1.0.0 for use with Go (golang) services.
Package daemon v1.0.0 for use with Go (golang) services.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL