![]() Or you could just rename the original or copy it or whatever. I created a symlink to make it run at boot: ln -s /usr/local/etc/rc.d/monit /usr/local/etc/rc.d/monit.sh. ![]() the monit start script installs in /usr/local/etc/rc.d/monit.I found the appropriate package file on freebsd for my pfSense 2.1 install: I thought I'd have a go at installing it manually, see how it works. It's been discussed before and there's a feature request on the pfsense redmine thing. ![]() It has worn it's age well, however it's reliance on old assumptions about the lifecycle of a system boot limits it's capabilities.I was looking for a nice monitoring package and the internet told me about monit. Keeping itself in a limited scope, and maintaining the "Do one thing and do it well" philosophy that gave rise to the UNIX ecosystem. With OpenRC, there is no persistent daemon, though integration with supervision tools like s6 and monit exist. OpenRC's sysvinit based startup shows it's age, but the system's lack of opinionation offers huge benefits. The regular syntax of all of these configurations does offer a boon, but at the cost of modularity and with greater complexity. Over the past few years the project has had a growing scope in the userland, as evidenced by the existance of things like the nf and nf, both of which used to be jobs outside of the initialization system. It relies on integrated, homogeneous functionality in order to gain performance boosts and an encompassing feature set. The declarative model of systemd emulates a "batteries included" model. nf offers configuration options on the journal, or logger. etc/systemd/nf: #CPUAffinity=1 2 #DefaultStandardOutput=journal #DefaultStandardError=inherit #JoinControllers=cpu,cpuacct net_cls,net_prio #RuntimeWatchdogSec=0 #ShutdownWatchdogSec=10min #CapabilityBoundingSet= #TimerSlackNSec= #DefaultTimeoutStartSec=90s #DefaultTimeoutStopSec=90s #DefaultRestartSec=100ms #DefaultStartLimitInterval=10s #DefaultStartLimitBurst=5 #DefaultEnvironment= #DefaultLimitCPU= #DefaultLimitFSIZE= #DefaultLimitDATA= #DefaultLimitSTACK= #DefaultLimitCORE= Systemd's configuration is similarly accessible in /etc/systemd/*.conf, from there it's possible to set things like the default CPU limits for processes and other things. Don't file bugs about this unless you can supply # patches that fix it without breaking other things! rc_parallel = "YES " # rc_logger launches a logging daemon to log the entire rc process to # /var/log/rc.log # NOTE: Linux systems require the devfs service to be started before # logging can take place and as such cannot log the sysinit runlevel. # WARNING: whilst we have improved parallel, it can still potentially lock # the boot process. When running in parallel we # prefix the service output with its name as the output will get # jumbled up. etc/rc.conf: # Set to "YES" if you want the rc system to try and start services # in parallel for a slight speed improvement. ![]() There are a few knobs to tweak based on user preferences. The default configuration on Funtoo is well commented and usually self-explanatory, even including gotchas in their notes. OpenRC is configured the same way as most traditional Linux/BSD services are configured. # SSHD_BINARY="/usr/sbin/sshd" Configuring Init Itself # SSHD_PIDFILE="/var/run/sshd.pid" # Path to the sshd binary (needs to be absolute path). SSHD_OPTS = " " # Pid file to use (needs to be absolute path). etc/conf.d/sshd: # /etc/conf.d/sshd: config file for /etc/init.d/sshd # Where is your sshd_config file stored? SSHD_CONFDIR = "/etc/ssh " # Any random options you want to pass to sshd. target network.target rvice EnvironmentFile = / etc/sysconfig/sshd ExecStartPre = / usr/sbin/sshd-keygen ExecStart = / usr/sbin/sshd -D $OPTIONS ExecReload = / bin/kill -HUP $MAINPID KillMode = process Restart = on -failure RestartSec = 42s WantedBy = multi -user.targetįor comparison, this is an excerpt of /etc/init.d/sshd on Funtoo Linux, not the entire file: depend ( ) from the earlier example of /etc/init.d/sshd: Here is the contents of /etc/systemd/system/rvice on a Fedora 20 system: Description = OpenSSH server daemon After = syslog. OpenRC stores scripts in /etc/init.d/, the scripts are typically standalone, configuration does not require multiple separate files. Systemd stores service files in /etc/systemd/system/ (user-provided) or /usr/lib/systemd/system/ (package-provided).service files are used to declare configuration. With OpenRC, this task is performed by shell scripts. With systemd, daemon configuration is handled by. Let's take a look at what this looks like for systemd and OpenRC. A computer scientist working in open source towards a more hopeful future.Īn initialization system's main interface with the user is through it's configuration scripts and service files.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |