upgrade-session.sh 1.28 KB
Newer Older
1
#!/bin/bash
David Beniamine's avatar
David Beniamine committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

# Copyright (C) 2018  Tetras Libre <Contact@Tetras-Libre.fr>
# Author: Beniamine, David <David.Beniamine@Tetras-Libre.fr>
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
# This program 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, see <http://www.gnu.org/licenses/>.

DIR=`dirname $0`
20 21 22 23 24 25 26 27

if [ ! -z "$1" ] && [ "$1" == "apt" ]
then
    apt-get update
    apt-get upgrade -y
fi


David Beniamine's avatar
David Beniamine committed
28
cp "$DIR/fond admin.png" /home/administrateur/Documents/
David Beniamine's avatar
David Beniamine committed
29

David Beniamine's avatar
David Beniamine committed
30
cp $DIR/conky.conf /etc/conky/
David Beniamine's avatar
David Beniamine committed
31
cp $DIR/session.sh /usr/local/bin/
32
$DIR/add_session_script.sh
David Beniamine's avatar
David Beniamine committed
33
$DIR/create_cifs_mounts.sh
David Beniamine's avatar
David Beniamine committed
34
$DIR/set_mime_apps.sh
David Beniamine's avatar
David Beniamine committed
35
$DIR/set_screens.sh
David Beniamine's avatar
David Beniamine committed
36
$DIR/install_print_drivers.sh
David Beniamine's avatar
David Beniamine committed
37

David Beniamine's avatar
David Beniamine committed
38 39 40 41 42 43
# Install missing libreoffice gtk
if [ -z "`pkg -l | grep libreoffice-gtk`" ]
then
    apt-get install -y libreoffice-gtk
fi

David Beniamine's avatar
Fixup  
David Beniamine committed
44 45
if [ $(who | wc -l) -eq 1 ]
then
David Beniamine's avatar
David Beniamine committed
46
    poweroff
David Beniamine's avatar
Fixup  
David Beniamine committed
47
fi