#!/bin/sh

. /usr/lib/live/config.sh

## live-config(7) - System Configuration Components
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
## Copyright (C) 2025 MiniOS <https://minios.dev>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.

#set -e

Init() {
    # Checking if package is installed
    if ! pkg_is_installed "xrdp" ||
        component_was_executed "xrdp"; then
        exit 0
    fi

    echo -n " xrdp"
}

Config() {
    if [ ! -f /var/log/xrdp.log ]; then
        touch /var/log/xrdp.log
        chown xrdp:adm /var/log/xrdp.log
        chmod 640 /var/log/xrdp.log
    fi

    # Creating state file
    touch /var/lib/live/config/xrdp
}

Init
Config
