Tasca cron a /var/lib/tftpboot/ltsp/i386/lts.conf

export LTSP_HANDLE_DAEMONS="false"
chroot /opt/ltsp/i386 apt-get install cron
 #!/bin/bash 
 #
 # P. Baco - Carlit.net
 # Crontab LTSP script
 #
 # This script, when started from lts.conf "RCFILE_XX = /etc/ltsp/crontab.sh"
 # will add up to 10 tasks to the thin client's root crontab.
 # Tasks are defined as regular crontab lines in lts.conf variables
 # "CRONTAB_01" to "CRONTAB_10"
 # ex:
 # CRONTAB_01 = "30 20 * * 1-5 /sbin/halt"
 # will halt the thin client at 20:30 monday to friday
 #
 # Note: Requires crontab to be installed in the thin client image
 #
 TMPFILE=/tmp/crontab.tmp

 echo "# Crontab file for LTSP thin clients" > $TMPFILE
 echo "# See CRONTAB_01 to CRONTAB_10 in lts.conf" >> $TMPFILE
 
 for i in 01 02 03 04 05 06 07 08 09 10
 do
   JOB=$(getltscfg CRONTAB_$i)
   if [ -n "$JOB" ]; then
     echo >> $TMPFILE
     echo "# Found in CRONTAB_$i" >> $TMPFILE
     echo "$JOB" >> $TMPFILE
   fi
 done
 if [ -f $TMPFILE ]; then
   crontab $TMPFILE
 fi
 rm -f $TMPFILE
chmod 755 /opt/ltsp/i386/etc/ltsp/crontab.sh
# Start the crontab creation script
RCFILE_02 = /etc/ltsp/crontab.sh

# Example crontab entry for shutting down thin clients at 16:00:
CRONTAB_01 = "00 16 * * 1-5 /sbin/halt"
Aquesta informació la vaig obtenir de la següent pàgina
https://help.ubuntu.com/community/UbuntuLTSP/ChrootCronjobs

També es pot trobar informació complementària sobre aquest tema a la pàgina:
https://help.ubuntu.com/community/UbuntuLTSP/AutomatedTCShutodwn




Inici de l'Espai | Menú de Documents | Servidors LTSP | Implementació de LINUX/UBUNTU