Repots primtux + mounts cifs

parent 2f4e4242
......@@ -39,7 +39,7 @@ do
EOF
done
# profs
for usr in prof direction
for usr in direction
do
mkdir -p /home/shares/$usr/SCAN
for classe in 01-CP 02-CE1-CE2 03-CM1-CM2
......
......@@ -36,7 +36,11 @@ test_and_fail $? "Cannot run upgrade"
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
test_and_fail $? "Cannot run dist upgrade"
# TODO : install repo Primtux
echo "deb http://depot.primtux.fr/repo/debs PrimTux4-amd64/main amd64" >> /etc/apt/sources.list.d/primtux.list
apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt
key=$(cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3)
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
rm -rf /tmp/${NAME}_apt_add_key.txt
DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::="--force-confold" -y install \
cifs-utils \
......
#!/bin/bash
SCOPE1=CP
SCOPE2=CE1-CE2
SCOPE3=CM1-CM2
SHARE_DIR="/home/shares/$USER"
# unmute sound
pactl set-sink-mute 0 0
/opt/primtux-eole/pactl_watch.sh &
while ! /bin/ping -c 2 ecole-dc; do sleep 10; done;
for d in 01-cp 02-ce1-ce2 03-cm1-cm2
do
rm $HOME/Documents/{ELEVES,PROFESSEURS} > /dev/null 2>&1
rm $HOME/Documents/$d/{ELEVES,PROFESSEURS} > /dev/null 2>&1
rmdir $HOME/Documents/$d > /dev/null 2>&1
done
rm $HOME/Documents/SCAN $HOME/Documents/CONFIDENTIEL > /dev/null 2>&1
mkdir -p $HOME/.config/gtk-3.0
......@@ -25,30 +15,6 @@ DOCUMENTS="$HOME/Documents/Partages_Serveur"
mkdir -p $DOCUMENTS
case "$USER" in
"01-mini"|"02-super"|"03-maxi")
ln -sf $SHARE_DIR/ELEVES $DOCUMENTS/ÉLÈVES
ln -sf $SHARE_DIR/PROFESSEURS $DOCUMENTS/PROFESSEURS
echo file://$DOCUMENTS/ÉLÈVES ÉLÈVES > $HOME/.config/gtk-3.0/bookmarks
echo file://$DOCUMENTS/PROFESSEURS PROFESSEURS >> $HOME/.config/gtk-3.0/bookmarks
;;
"prof")
mkdir -p $DOCUMENTS/01-$SCOPE1
mkdir -p $DOCUMENTS/02-$SCOPE2
mkdir -p $DOCUMENTS/03-$SCOPE3
ln -sf $SHARE_DIR/01-$SCOPE1/ELEVES $DOCUMENTS/01-$SCOPE1/ÉLÈVES
ln -sf $SHARE_DIR/01-$SCOPE1/PROFESSEURS $DOCUMENTS/01-$SCOPE1/PROFESSEURS
ln -sf $SHARE_DIR/02-$SCOPE2/ELEVES $DOCUMENTS/02-$SCOPE2/ÉLÈVES
ln -sf $SHARE_DIR/02-$SCOPE2/PROFESSEURS $DOCUMENTS/02-$SCOPE2/PROFESSEURS
ln -sf $SHARE_DIR/03-$SCOPE3/ELEVES $DOCUMENTS/03-$SCOPE3/ÉLÈVES
ln -sf $SHARE_DIR/03-$SCOPE3/PROFESSEURS $DOCUMENTS/03-$SCOPE3/PROFESSEURS
ln -sf $SHARE_DIR/SCAN $DOCUMENTS/SCAN
ln -sf $SHARE_DIR/CONFIDENTIEL $DOCUMENTS/CONFIDENTIEL
echo file://$DOCUMENTS/01-$SCOPE1 01-$SCOPE1 > $HOME/.config/gtk-3.0/bookmarks
echo file://$DOCUMENTS/02-$SCOPE2 02-$SCOPE2 >> $HOME/.config/gtk-3.0/bookmarks
echo file://$DOCUMENTS/03-$SCOPE3 03-$SCOPE3 >> $HOME/.config/gtk-3.0/bookmarks
echo file://$DOCUMENTS/SCAN SCAN >> $HOME/.config/gtk-3.0/bookmarks
echo file://$DOCUMENTS/CONFIDENTIEL CONFIDENTIEL >> $HOME/.config/gtk-3.0/bookmarks
;;
"direction")
mkdir -p $DOCUMENTS/01-$SCOPE1
mkdir -p $DOCUMENTS/02-$SCOPE2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment