Hot answers tagged

8

You can use option daemon off: exec /usr/sbin/nginx -c /etc/nginx/nginx.conf -g "daemon off;" From nginx wiki: You can use daemon off safely in production mode with runit / daemontools however you can't do a graceful upgrade. master_process off should never be used in production. When you use runit to control nginx, it becomes the parent process ...


5

Use setsid as follows. #!/bin/sh exec setsid /sbin/agetty 38400 tty1 linux --noclear The setsid wrapper will start agetty as a session leader (see this answer), allowing it to bind to tty1. You can see the different behavior from the following example ps. # ps xao pid,ppid,sid,tty,cmd [...] 150 1 150 ? runsvdir 154 150 155 ? runsv agetty-3 157 ...


3

I cannot figure out how to get it running. In the daemontools family world, log services are just services like any other. So you run svlogd with a run program just like you would run a "main" service with a run program. The special things about "log" services are merely that: The "log" service directory is located using a symbolic link from (or a ...


2

You can pass environments using the 'env' argument right before you invoke your app. I've done this for a single environment, though I'm not sure how one would provide multiple envariables exec chpst -u www-data:www-data env LOGNAME='www-data' /var/www/myapp/myapp


2

I'm not sure why your dhcpcd isn't using syslog, as that's the default behavior of the utility (maybe Void Linux is using a special version). Anyway the output is going to the console because that's where the init manager sends its output, and unless redirected, applications started by the init manager inherit STDOUT & STDERR. Meaning the fix is to ...


2

Gerrit Pape, who maintains both xyr own runit and Bernstein's daemontools packages for Debian, is one of the few developers that took the idea of "init-system neutrality" (that was much bandied about after the Debian systemd hoo-hah) really to heart and has tried hard to support running these under van Smoorenburg init, upstart, and systemd. The post-...


2

The echo command outputs its command line arguments to stdout, in this case it's piped as input to the following tee command which runs as root (via sudo) and puts the "0" into the file /sys/module/snd_hda_intel/parameters/power_save. From https://forums.linuxmint.com/viewtopic.php?t=186531 the best advice is to add "options snd_hda_intel power_save=0" to /...


2

The Short Answer For the time being, no, there is no automated method specific to runit. The Long Answer There have been several approaches to resolving this. Using Pre-Built Scripts The first is to have a pre-built set of scripts. These can be extracted from other projects. Void Linux uses runit as its base init and supervisor, so it might be of ...


2

Just type cinelerra in a terminal. With ./usr/bin/cinelerra, your shell will look for a folder called usr in the current directory, a folder called bin inside that, and cinelerra inside the latter; that’s not what you’re after here. If you want to specify the full path, drop the full stop: /usr/bin/cinelerra


1

first one, you should be create a correct service by wpa_passphrase , don't confused between wpa_passphrase and wpa_supplicant, create service as bellow: wpa_passphrase "wifi-name" "password" >> /etc/wpa_supplicant/wpa_supplicant.conf now, you must get your device name like wlan0 ,by execute ip link $ ip link now ,run wpa-...


1

So I did eventually solve the problem, here's the answer for anyone who'd face the same problem. The mistake was actually quite dumb but I got to notice it only after I got to know how logging works in void, somehow only the syslog (but not the postgres log) did show the error that read SSL is not supported in this build, so I started digging that way and ...


1

I figured it out, all I had to do was load iwlwifi


1

Actually, you don't. runsv takes this behaviour from svscan in the original Bernstein daemontools, which did the same. Almost everyone else has copied it. Bruce Guenter's svscan from daemontools-encore, Laurent Bercot's s6-svscan from s6, and Wayne Marshall's perpd from perp all do likewise. Even Adam Sampson's svscan from freedt connects only standard ...


1

The default executable name is a.out, according to the g++ manpage: -o file Place output in file file. This applies to whatever sort of output is being produced, whether it be an executable file, an object file, an assembler file or preprocessed C code. If -o is not specified, the default is to put an executable file in a.out, the ...


1

Use 'logger' to syslog If you're happy with syslog, then use logger instead of svlogd. The whole point of having a runscript for your logger is that you can run whatever program you like to do the logging. /etc/sv/test-1/log/run #!/bin/sh exec logger -i -p daemon.notice -t my_service . Merge when viewed Another good idea is to just let the logs go to ...


1

As far as I can tell, svlogd doesn't support combining logs into a single file. However, it does support logging to a socket. My workaround is to instruct svlogd to forward log entries over UDP to the running rsyslog instance. /etc/sv/test-1/log/run #!/bin/sh exec svlogd -tt /var/log/test/1 /var/log/test/1/config ptest-1: U127.0.0.1 /etc/sv/test-2/...


Only top voted, non community-wiki answers of a minimum length are eligible