#!/bin/bash # Bash logout file that is symlinked for each package user # By pass if the bypass is set if [ "$TT_BYPASS_LOGOUT" != "true" ] then # Source pkg specific logout script if any if [ -f $TT_PKG_DATA_DIR/PKG_logout ] then source $TT_PKG_DATA_DIR/PKG_logout fi cd # Remove tracefiles rm -f tracefile.* # Remove login lock rm -f .Loggedin # Clean tmp dir if any rm -rf $TT_PKG_TMP_DIR backupConfig 2>/dev/null install -d $TT_BACKUP_DIR/$TT_PKG_NAME cp -a config data data-ttPM-$TT_UNIQ_ID notes patches $TT_BACKUP_DIR/$TT_PKG_NAME cd $TT_BACKUP_DIR sudo -u $TT_PKG_USER scp -r $TT_PKG_NAME tushar@anduin.linuxfromscratch.org:public_html/ttPM-build/ fi # Bash sometimes fails to exit when some of the previous command has returned an error! Hence the hack exit 0