unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
startxfce4
#бекапчик на всякий случай
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
#замена строк
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
echo xfce4-session > ~/.xsession
#!/usr/bin/bash
timestamp=`date +%d.%m.%Y-%H.%M.%S`
src="source"
dst="destination"
for list in `ls $src`
do
cd $src/$list
last=`ls -t $src/$list | head -1`
filename=`echo $last | cut -d _ -f 1`
mkdir $dst/$list
if [ "$filename" == "$list" ]; then
cp $src/$list/$last $dst/$list/$timestamp.bak
fi
done
curl --header 'Content-Type: application/json' --request 'POST' --data '{"chat_id":"","text":"ServerName: src dumped successfully."}' "https://api.telegram.org/bot/sendMessage"