#!/bin/bash
#
# Copyright (c) Authors: https://www.armbian.com/authors
#
# This file is licensed under the terms of the GNU General Public
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.

# DO NOT EDIT THIS FILE
# any changes will be lost on board support package update

# armbian-luks-rekey: the first-boot re-encryption of the root.
systemctl -q is-active armbian-luks-rekey 2> /dev/null || exit 0
progress=$(grep -o 'Progress: *[0-9]*' /var/log/armbian-luks-rekey.log 2> /dev/null | tail -n 1 | grep -o '[0-9]*$')
printf "\e[0;93m Re-encrypting: %s%% done. Please wait. \x1B[0m \n" "${progress:-0}"
