FreeBSD Manual Pages
man(8) immortaldir man page man(8) NAME immortaldir - start services located in a specified directory. SYNOPSIS immortalctl [dir] [-v] DESCRIPTION immortaldir will scan every 5 seconds a directory searching for files ending in .yml and track changes. The YAML files should conform the im- mortal(8) configuration format. If a file changes the service will be restarted, immortalctl(8) exit and stop. If a file is touched and service is down, it will be started, immor- talctl(8) start. If a file is removed, the supervisor will exit, immortalctl(8) exit, this may end the existing process but in cases where the PID is been followed, only the supervisor will exit. Based on your operating system the directory containing the services could be: /usr/local/etc/immortal or /etc/immortal immortaldir checks for changes also in the IMMORTAL_SDIR directory in order to restart services that are not anymore running, for example when a service has been halted (signal halt) this helps to automati- cally restart the service. When dealing with multiple operating systems could be handy to use a unique location like /immortal To keep services persistent across reboots a startup script should be used to run immortaldir on boot time. OPTIONS dir Path of directory containing immortal configuration files "*.yml" -v print current version ENVIRONMENT IMMORTAL_SDIR This environment variable allows to override the default super- vise directory /var/run/immortal, used also by immortalctl(8) and immortal(8) By default immortaldir after finding a configu- ration file "service.yml" will invoke immortal(8) and pass to it the option: -ctl <service> This will create the directory "service" in /var/run/immortal: /var/run/immortal/service |--lock `--immortal.sock lock is a file that prevents running more than once the same service immortal.sock is a Unix socket that can be used to manage the process, example: Get status: curl --unix-socket immortal.sock http:/status -s Down. If the service is running, send it a TERM signal. Af- ter it stops, do not restart it: curl --unix-socket immortal.sock http://im/signal/down -s Start: curl --unix-socket immortal.sock http://im/signal/start -s If a different path instead of /var/run/immortal is required, the IMMORTAL_SDIR environment variable can be used. EXAMPLES Read configuration files from /etc/immortal: immortaldir /etc/immortal Read configuration files from /srv/immortal and create supervise direc- tories on /var/www/immortal export IMMORTAL_SDIR=/var/www/immortal immortaldir /srv/immortal SEE ALSO immortal(8), immortalctl(8) BUGS https://github.com/immortal/immortal/issues AUTHOR Nicolas Embriz <nbari@tequila.io> For more information, see the immortal homepage at https://immortal.run immortaldir March 2017 man(8)
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | ENVIRONMENT | EXAMPLES | SEE ALSO | BUGS | AUTHOR
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=immortaldir&sektion=8&manpath=FreeBSD+Ports+14.3.quarterly>
