<html><head></head><body style="zoom: 0%;"><div dir="auto">You could try to implement net-online from OpenRC in s6:<br></div>
<div dir="auto"><a href="https://github.com/OpenRC/openrc/blob/master/init.d/net-online.in">https://github.com/OpenRC/openrc/blob/master/init.d/net-online.in</a><br><br></div>
<div dir="auto">Basically an infinite loop with a configurable timeout that pings a url/ip over and over until it can connect, so that service gets marked as "up" once the ping succeeds.<br><br></div>
<div dir="auto">I am not an s6 expert, so maybe Dudeman guy might have an idea or be able to implement this.<br><br></div>
<div dir="auto"><!-- tmjah_g_1299s -->--<!-- tmjah_g_1299e --><br></div>
<div dir="auto"><!-- tmjah_g_1299s -->Chris Cromer<!-- tmjah_g_1299e --><br></div>
<div dir="auto"><!-- tmjah_g_1299s -->Artix Linux Developer<!-- tmjah_g_1299e --></div>
<div class="gmail_quote" >On Sep 20, 2021, at 11:23 PM, Javier <<a href="mailto:je-vv@e.email" target="_blank">je-vv@e.email</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="blue">Hi,<br><br>I'm wondering if I should comment out:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> LogFile /var/log/clamav/clamd.log<br></blockquote><br>from /etc/clamav/clamd.conf, and:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> UpdateLogFile /var/log/clamav/freshclam.log<br></blockquote><br>from /etc/clamav/freshclam.conf<br><br>Also I'm wondering if there's a way for s6 services/oneshots to know if there's already internet connectivity available (not that the ethernet interfaces are up, or that dhcpcd for example is up, but rather that there's internet up and running).  I believe since last s6 upgrade (last week), now freshclam starts too early, and fills the starting console with inability to download the DB...  See logs:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> 2021-09-20 20:14:32.645666876  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:32.645762441  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:32.645768452  ERROR: Initialization error!<br> 2021-09-20 20:14:32.661246349  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:33.516879873  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:33.525522860  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:33.525591955  ERROR: Initialization error!<br> 2021-09-20 20:14:33.526189974  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:34.481701826  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:34.485201946  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:34.485255360  ERROR: Initialization error!<br> 2021-09-20 20:14:34.485807613  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:35.482655430  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:35.482720095  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:35.482758594  ERROR: Initialization error!<br> 2021-09-20 20:14:35.483257024  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:36.483704169  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:36.488522094  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:36.488574701  ERROR: Initialization error!<br> 2021-09-20 20:14:36.489075278  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:37.489173050  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:37.489193288  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:37.489198444  ERROR: Initialization error!<br> 2021-09-20 20:14:37.489655235  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:38.489196317  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:38.489275089  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:38.489312739  ERROR: Initialization error!<br> 2021-09-20 20:14:38.489830220  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:39.486066312  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:39.488542981  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:39.488600637  ERROR: Initialization error!<br> 2021-09-20 20:14:39.489145708  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:40.489017143  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:40.489097324  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:40.489135807  ERROR: Initialization error!<br> 2021-09-20 20:14:40.489652317  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:41.492482369  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:41.495202256  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:41.495259903  ERROR: Initialization error!<br> 2021-09-20 20:14:41.495833709  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:42.492479416  ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).<br> 2021-09-20 20:14:42.492561067  ERROR: initialize: libfreshclam init failed.<br> 2021-09-20 20:14:42.492599624  ERROR: Initialization error!<br> 2021-09-20 20:14:42.493123969  ERROR: /var/log/clamav/freshclam.log is locked by another process<br> 2021-09-20 20:14:43.490707475  ClamAV update process started at Mon Sep 20 20:14:43 2021<br> 2021-09-20 20:14:43.495391476  WARNING: Can't query <a href="http://current.cvd.clamav.net">current.cvd.clamav.net</a><br> 2021-09-20 20:14:43.495462233  WARNING: Invalid DNS reply. Falling back to HTTP mode.<br> 2021-09-20 20:14:43.495693667  Trying to retrieve CVD header from <a href="https://database.clamav.net/daily.cvd">https://database.clamav.net/daily.cvd</a><br> 2021-09-20 20:14:43.496772814  WARNING: remote_cvdhead: Download failed (6) WARNING:  Message: Couldn't resolve host name<br> 2021-09-20 20:14:43.496785468  WARNING: Failed to get daily database version information from server: <a href="https://database.clamav.net">https://database.clamav.net</a><br> 2021-09-20 20:14:43.496793499  ERROR: check_for_new_database_version: Failed to find daily database using server <a href="https://database.clamav.net">https://database.clamav.net</a>.<br> 2021-09-20 20:14:43.496798150  Trying again in 5 secs...<br> 2021-09-20 20:14:48.497159402  Trying to retrieve CVD header from <a href="https://database.clamav.net/daily.cvd">https://database.clamav.net/daily.cvd</a><br> 2021-09-20 20:14:48.986050859  daily.cld database is up-to-date (version: 26298, sigs: 1934493, f-level: 90, builder: raynman)<br> 2021-09-20 20:14:48.986067873  Trying to retrieve CVD header from <a href="https://database.clamav.net/main.cvd">https://database.clamav.net/main.cvd</a><br> 2021-09-20 20:14:49.221972555  main.cld database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)<br> 2021-09-20 20:14:49.221988805  Trying to retrieve CVD header from <a href="https://database.clamav.net/bytecode.cvd">https://database.clamav.net/bytecode.cvd</a><br> 2021-09-20 20:14:49.409622147  bytecode.cld database is up-to-date (version: 333, sigs: 92, f-level: 63, builder: awillia2)<br></blockquote><br>On the console what I get to see is that it couldn't download the daily DB, not the whole thing...  About conflicting logging, perhaps I actually can extend those configs to ALL services/oneshots, if managed by s6...  For example, perhaps I should remove:<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> log_file             "/var/log/mpd.log<br></blockquote><br> From /etc/mpd.conf, and the same for all other services/oneshots...  Is that right?  Also, what about internet connection discovery as a dependency to services, which depend on having internet access?<br><br>Thanks !<br></pre></blockquote></div></body></html>