All Projects → immortal → Immortal

immortal / Immortal

Licence: bsd-3-clause
⭕ A *nix cross-platform (OS agnostic) supervisor

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Immortal

Ngircd
Free, portable and lightweight Internet Relay Chat server
Stars: ✭ 292 (-58.35%)
Mutual labels:  daemon, unix
Xsuspender
👀 💻 💤 🔋 Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (-92.44%)
Mutual labels:  daemon, unix
Spm
A process manager similar to systemd and foreman with stop feature, written in Go.
Stars: ✭ 44 (-93.72%)
Mutual labels:  daemon, process
daemonize-me
Rust library to ease the task of creating daemons
Stars: ✭ 34 (-95.15%)
Mutual labels:  unix, daemon
jobflow
runs stuff in parallel (like GNU parallel, but much faster and memory-efficient)
Stars: ✭ 67 (-90.44%)
Mutual labels:  unix, process
daemonize
Template code for writing UNIX-daemons.
Stars: ✭ 33 (-95.29%)
Mutual labels:  unix, daemon
Multiprocess
🚀Easy to make the common PHP/Python/js...script change daemon and multi-process execution
Stars: ✭ 151 (-78.46%)
Mutual labels:  daemon, process
core d.js
Offload your heavy lifting to a daemon. Extracted from eslint_d.
Stars: ✭ 21 (-97%)
Mutual labels:  daemon, process
S6
The s6 supervision suite.
Stars: ✭ 452 (-35.52%)
Mutual labels:  unix, supervisor
Workflower
A BPMN 2.0 workflow engine for PHP
Stars: ✭ 540 (-22.97%)
Mutual labels:  process
Cross Env
🔀 Cross platform setting of environment scripts
Stars: ✭ 5,623 (+702.14%)
Mutual labels:  unix
Spotifyd
A spotify daemon
Stars: ✭ 5,690 (+711.7%)
Mutual labels:  daemon
Speed Camera
A Unix, Windows, Raspberry Pi Object Speed Camera using python, opencv, video streaming, motion tracking. Includes a Standalone Web Server Interface, Image Search using opencv template match and a whiptail Admin Menu Interface Includes picam and webcam Plugins for motion track security camera configuration including rclone sync script. watch-app allows remotely controller camera configuration from a remote storage service name. Uses sqlite3 and gnuplot for reporting. Recently added openalpr license plate reader support.
Stars: ✭ 539 (-23.11%)
Mutual labels:  unix
Gosuv
Deprecated!!! Process managerment writtern by golang, inspired by python-supervisor
Stars: ✭ 618 (-11.84%)
Mutual labels:  supervisor
Imgur Screenshot
Take screenshot selection, upload to imgur. + more cool things
Stars: ✭ 540 (-22.97%)
Mutual labels:  unix
Open Shell Book
开源书籍:《Shell 编程范例》,面向操作对象学 Shell!本书作者发布了《360°剖析 Linux ELF》视频课程,欢迎订阅:https://www.cctalk.com/m/group/88089283
Stars: ✭ 666 (-4.99%)
Mutual labels:  process
Ocaml Cohttp
An OCaml library for HTTP clients and servers using Lwt or Async
Stars: ✭ 533 (-23.97%)
Mutual labels:  unix
Nscde
Modern and functional CDE desktop based on FVWM
Stars: ✭ 526 (-24.96%)
Mutual labels:  unix
Buildxl
Microsoft Build Accelerator
Stars: ✭ 676 (-3.57%)
Mutual labels:  unix
Command Injection Payload List
🎯 Command Injection Payload List
Stars: ✭ 658 (-6.13%)
Mutual labels:  unix

⭕ immortal

CircleCI Build Status Coverage Status codecov Go Report Card

A *nix cross-platform (OS agnostic) supervisor

https://immortal.run/

GitHub release GoDoc contributions welcome

Linux precompiled binaries

deb rpm

run on behalf other system user

If services need to run on behalf other system user www, nobody, www-data, not root, immortal should be compiled from source for the desired target/architecture, otherwise, this error may be returned:

Error looking up user: "www". user: Lookup requires cgo

See more: https://golang.org/cmd/cgo/

If using FreeBSD or macOS you can install using pkg/ports or homebrew, for other platforms work is in progress, any help for making the port/package for other systems would be appreciated.

Compile from source

Setup go environment https://golang.org/doc/install

go >= 1.12 is required

For example using $HOME/go for your workspace

$ export GOPATH=$HOME/go

Create the directory:

$ mkdir -p $HOME/go/src/github.com/immortal

Clone project into that directory:

$ git clone [email protected]:immortal/immortal.git $HOME/go/src/github.com/immortal/immortal

Build by just typing make:

$ cd $HOME/go/src/github.com/immortal/immortal
$ make

To install/uninstall:

$ make install
$ make uninstall

configuration example

Content of file /usr/local/etc/immortal/www.yml:

# pkg install go-www
cmd: www
cwd: /usr/ports
log:
    file: /var/log/www.log
    age: 10  # seconds
    num: 7   # int
    size: 1  # MegaBytes
wait: 1
require:
  - foo
  - bar

If foo and bar are not running, the service www will not be started. Skip age, num & size options to avoid log-rotation completely.

foo and bar are the names for the services defined on the same path www.yaml is located, foo.yml & bar.yml

Paths

When using immortaldir:

/usr/local/etc/immortal
|--foo.yml
|--bar.yml
`--www.yml

The name of the file.yml will be used to reference the service to be daemonized excluding the extension .yml.:

foo
bar
www

/var/run/immortal/

/var/run/immortal
|--foo
|  |-lock
|  `-immortal.sock
|--bar
|  |-lock
|  `-immortal.sock
`--www
   |-lock
   `-immortal.sock

immortal like non-root user

Any service launched like not using using immortaldir will follow this structure:

~/.immortal
|--(pid)
|  |--lock
|  `--immortal.sock
|--(pid)
|  |--lock
|  `--immortal.sock
`--(pid)
   |--lock
   `--immortal.sock

immortalctl

Will print current status and allow to manage the services

debug

pgrep -fl "immortal -ctl"  | awk '{print $1}' | xargs watch -n .1 pstree -p

Test status using curl & jq

status:

curl --unix-socket immortal.sock http:/status -s | jq

note the single '/' https://superuser.com/a/925610/284722

down:

curl --unix-socket immortal.sock http://im/signal/d -s | jq

up:

curl --unix-socket immortal.sock http://im/signal/u -s | jq
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].