Files
fedora-OEMDRV/client_software/0120_xrdp/install.sh
T
2026-03-26 15:59:05 +01:00

25 lines
753 B
Bash
Executable File

#!/usr/bin/env sh
# SPDX-FileCopyrightText: Daniel Pätzold
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Sofwareinstallation script for Nextcloud Talk.
#
#Check for root
if [ "$EUID" -ne 0 ]; then
echo "Error: Script requires root. Please check if ${SCRIPTPATH}/${SCRIPTNAME} is in sudoers rules and if you are a member. And if executed via sudo."
exit 1
fi
dnf install xrdp -y
XRDP_SERVICESTATUS=$( systemctl is-enabled xrdp )
if [ ${FIRSTRUN_SERVICESTATUS} != "enabled" ]; then
echo "Enabling XRDP Service and Firewall:"
systemctl enable xrdp
systemctl start xrdp
firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman
fi