remove trailing emtpy line from jk_socketd.ini

This commit is contained in:
Matthew Saunders Brown 2023-05-20 12:08:08 -07:00
parent 4c688b2bc6
commit 7afc8ad284

View File

@ -88,4 +88,6 @@ fi
# remove jailkit socket if it exists # remove jailkit socket if it exists
if grep -q "\[/usr/jails/$username/dev/log\]" /etc/jailkit/jk_socketd.ini; then if grep -q "\[/usr/jails/$username/dev/log\]" /etc/jailkit/jk_socketd.ini; then
sed -i "/\/usr\/jails\/$username\/dev\/log/,+3 d" /etc/jailkit/jk_socketd.ini sed -i "/\/usr\/jails\/$username\/dev\/log/,+3 d" /etc/jailkit/jk_socketd.ini
# remove trailing empty line from file, if it exists
sed -i '${/^$/d;}' /etc/jailkit/jk_socketd.ini
fi fi