#!/bin/bash

# Copyright (C) 2010-2012 by X2Go project, http://wiki.x2go.org
#       Oleksandr Shneyder <oleksandr.shneyder@obviously-nice.de>
#       Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de>
#       Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

# X2Go is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# X2Go is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

mkdir -p ~x2gothinclient
mkdir -p ~x2gothinclient/.x2goclient
test -e /etc/x2go/x2gothinclient_sessions && cp /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2goclient/sessions
test -e /etc/x2go/freerdp/known_hosts && mkdir -p ~x2gothinclient/.freerdp && cp /etc/x2go/freerdp/known_hosts ~x2gothinclient/.freerdp/known_hosts
mkdir -p ~x2gothinclient/.kde
mkdir -p ~x2gothinclient/.kde/socket-`hostname`
mkdir -p ~x2gothinclient/mounts
mkdir -p ~x2gothinclient/export
mkdir -p  ~x2gothinclient/logins
mkdir -p ~x2gothinclient/.ssh
mkdir -p ~x2gothinclient/.x2go
chown x2gothinclient:x2gothinclient ~x2gothinclient -Rf
chmod go-rwx ~x2gothinclient -Rf
