#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)

# Minimal OS variable loading for performance
. /etc/profile.d/001-functions

tocon "Setting root password..."

if [ ! -d "/storage/.cache/samba" ]
then
  mkdir -p /storage/.cache/samba
  touch /storage/.cache/samba/smbpasswd
fi

ROOTPASS=$(get_setting root.password)
setrootpass "${ROOTPASS}"
