Unverified Commit c7eff371 authored by David Beniamine's avatar David Beniamine
Browse files

Add session script to startup

parent 99fd70e8
Loading
Loading
Loading
Loading

add_session_script.sh

0 → 100755
+9 −0
Original line number Diff line number Diff line
#!/bin/bash
USERS="01-mini 02-super 03-maxi prof direction"
for u in $USERS
do
	if [ -z "`grep '^exec /usr/local/bin/session.sh' /home/$u/.fluxbox/startup `" ]
	then
		sed -i -e 's@^exec fluxbox$@exec /usr/local/bin/session.sh \&\nexec fluxbox@' /home/$u/.fluxbox/startup 
	fi
done
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ newhost="u$numero"
sudo sed -i "s/$hostn/$newhost/g" /etc/hosts
sudo sed -i "s/$hostn/$newhost/g" /etc/hostname
cp "$DIR/fond admin.png" /home/administrateur/Documents/
cp $DIR/session.sh /usr/local/bin/
$DIR/add_session_script.sh

$DIR/register.sh $newhost
cp $DIR/register.sh /etc/cron.weekly/
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

DIR=$(dirname $0)
cd $DIR
cp $DIR/session.sh /usr/local/bin/
export HTTPS_PROXY="http://dnsproxy:3128"
git pull
./do_postinstall.sh
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ DIR=`dirname $0`
cp "$DIR/fond admin.png" /home/administrateur/Documents/

cp $DIR/session.sh /usr/local/bin/
$DIR/add_session_script.sh

if [ ! -z "$1" ] && [ "$1" == "apt" ]
then