-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* pfclient_daemon: replace mawk pipe with s6wrap prepend exec as well for nicer exits * remove qemu: no longer needed * logwatcher: don't hide truncation exec tail * suppress the delayed direct output of pfclient * remove i386 from tests
- Loading branch information
Showing
5 changed files
with
38 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
#!/command/with-contenv bash | ||
#shellcheck shell=bash | ||
|
||
sleep 5 | ||
tail -c 100k -F /var/log/pfclient/*.log 2> >(grep -v truncated >&2) | ||
while ! pgrep pfclient &>/dev/null; do | ||
sleep 0.5 | ||
done | ||
exec s6wrap --timestamps --quiet --prepend='pfclient_log' --args \ | ||
tail -c 100k -F /var/log/pfclient/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,16 @@ | ||
#!/command/with-contenv bash | ||
#shellcheck shell=bash | ||
|
||
# Test pfclient can run natively (without qemu) | ||
if /usr/local/bin/pfclient --version > /dev/null 2>&1; then | ||
# pfclient can be run natively | ||
s6-setuidgid nobody /usr/local/bin/pfclient \ | ||
--connection_type=1 \ | ||
--address="${BEASTHOST}" \ | ||
--port="${BEASTPORT}" \ | ||
--data_format=1 \ | ||
--sharecode="${SHARECODE}" \ | ||
--lat="${LAT}" \ | ||
--lon="${LONG}" \ | ||
--pid_file=/run/pfclient.pid \ | ||
--config_path=/config/pfclient-config.json \ | ||
--log_path=/var/log/pfclient \ | ||
2>&1 | mawk -W Interactive '{print "[pfclient_daemon] " $0}' | ||
|
||
else | ||
# pfclient needs qemu | ||
s6-setuidgid nobody qemu-arm-static /usr/local/bin/pfclient \ | ||
--connection_type=1 \ | ||
--address="${BEASTHOST}" \ | ||
--port="${BEASTPORT}" \ | ||
--data_format=1 \ | ||
--sharecode="${SHARECODE}" \ | ||
--lat="${LAT}" \ | ||
--lon="${LONG}" \ | ||
--pid_file=/run/pfclient.pid \ | ||
--config_path=/config/pfclient-config.json \ | ||
--log_path=/var/log/pfclient \ | ||
2>&1 | mawk -W Interactive '{print "[pfclient_daemon] " $0}' | ||
fi | ||
exec s6-setuidgid nobody \ | ||
s6wrap --ignore=stdout --quiet --prepend='pfclient_daemon' --args \ | ||
/usr/local/bin/pfclient \ | ||
--connection_type=1 \ | ||
--address="${BEASTHOST}" \ | ||
--port="${BEASTPORT}" \ | ||
--data_format=1 \ | ||
--sharecode="${SHARECODE}" \ | ||
--lat="${LAT}" \ | ||
--lon="${LONG}" \ | ||
--pid_file=/run/pfclient.pid \ | ||
--config_path=/config/pfclient-config.json \ | ||
--log_path=/var/log/pfclient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters