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
- Compile program according to the os-arch system.
- Copy the compiled file into your project package and rename to "daemon".
- 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