#!/bin/sh

alterator_api_version=1
. alterator-sh-functions
. /usr/lib/alterator/backends/systeminfo.d/notes

on_message() {
	case "$in_action" in
	read)
		local name="${in_name:-license}"
		html_file="$(LC_ALL=$in_language get_notes_file_path $name)"
		if [ -s "$html_file" ]; then
			write_string_param "url" "$html_file"
		else
			write_error "$(_ "File not found") $name"
		fi
		;;
	esac
}

message_loop
