touch debug.log in bitcoin_checkconfig

This commit is contained in:
Mononaut 2025-10-17 10:13:26 +00:00
parent cdca6f94b8
commit fadc038419
No known key found for this signature in database
GPG key ID: A3F058E41374C04E

View file

@ -64,6 +64,8 @@ bitcoin_checkconfig()
echo "Missing data directory: ${bitcoin_data_dir}"
exit 1
fi
touch "${bitcoin_data_dir}/debug.log"
chmod 644 "${bitcoin_data_dir}/debug.log"
chown -R "${bitcoin_user}:${bitcoin_group}" "${bitcoin_data_dir}"
if [ ! -f "${bitcoin_config_file}" ]
@ -88,10 +90,6 @@ bitcoin_precmd()
{
bitcoin_checkconfig
# ensure debug.log exists & override default permissions
touch "${bitcoin_data_dir}/debug.log"
chmod 644 "${bitcoin_data_dir}/debug.log"
pid=$(check_pidfile "${pidfile}" "${procname}")
if [ -z "${pid}" ]
then