Add logout script

master3.3
Mike Hiretsky 14 years ago
parent a67b994e24
commit 5f23866d47

@ -0,0 +1,30 @@
#! /bin/sh
# Copyright 2010 Mir Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
env-update
source /etc/profile
source /usr/share/calculate-2.2/xdm/functions
if [ -e '/usr/bin/cl-sync-2.2' ];
then
ERRORLOG=`/usr/bin/cl-sync-2.2 --color=never --logout $USER 2>&1`
# при неудачном выполнении, сгенерируем ошибку
if [ "$?" -gt "0" ];
then
echo "$ERRORLOG" >> $FILE_LOG
exit 1
fi
fi
exit 0

@ -71,7 +71,7 @@ data_files += create_data_files (data_dirs_template, template_calculate_dir)
data_files += create_data_files (data_dirs_share, share_calculate_dir)
data_files += [('/etc/init.d', ['data/client'])]
data_files += [('/etc/calculate/xdm/login.d', ['data/login.d/10client'])] +\
[('/etc/calculate/xdm/logout.d', [])] +\
[('/etc/calculate/xdm/logout.d', ['data/logout.d/10client'])] +\
[('/var/calculate/templates', [])]

Loading…
Cancel
Save