Skip to content

Commit

Permalink
Store tinirc.pid on start, truncate tinirc on start (#277)
Browse files Browse the repository at this point in the history
Storing the pid (which will become the pid of the process tinirc
starts) makes writing stop scripts easier.

Picked /tmp as the location, as /var/run might not be available in
slim no-rc images.

Fixed a bug where an existing copy of tinirc would be appended
to, meaning that none of the pot's settings would actually be
applied.
  • Loading branch information
grembo committed Dec 16, 2023
1 parent 9a102e9 commit 146b559
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Added
- tinirc: Write tinirc's pid to /tmp/tinirc.pid (#277)
- set-attr/stop: Add attributes exec_stop and stop_timeout (#275)

### Fixed
- tinirc: Overwrite tinirc on start instead of appending to an existing file (#277)
- start: Fix setting of nullfs attribute

## [0.15.6] 2023-09-29
Expand Down
4 changes: 3 additions & 1 deletion share/pot/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,9 @@ _js_start()
else
prec=35
fi
cat >>"${POT_FS_ROOT}/jails/$_pname/m/tmp/tinirc" <<-EOT
cat >"${POT_FS_ROOT}/jails/$_pname/m/tmp/tinirc" <<-EOT
# created automatically by pot, changes will be overwritten
echo \$\$ >/tmp/tinirc.pid
if sysctl -n kern.features.inet6 >/dev/null 2>&1; then
ip6addrctl flush >/dev/null 2>&1
ip6addrctl install /dev/stdin <<EOF
Expand Down

0 comments on commit 146b559

Please sign in to comment.