initial commit of bin scripts into git

This commit is contained in:
2023-11-08 13:38:19 +11:00
commit 3735eea3c6
113 changed files with 11631 additions and 0 deletions

31
manage_teams Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
log=/tmp/manage_teams.log
debug=1
hour=`date +%H`
dow=`date +%u`
if [ $dow -gt 5 ]; then
kill=1
echo "dow($dow): $kill"
elif [ $hour -gt 18 ]; then
kill=1
echo "hour($hour): $kill"
elif [ $hour -lt 7 ]; then
kill=1
echo "hour($hour): $kill"
else
kill=0
fi
if [ $debug ]; then
echo "`date`: if dow=$dow (>5?) or hour=$hour (<7 or >18?) -> kill=$kill (1==will kill)" >> $log
fi
if [ $kill == 1 ]; then
if [ $debug ]; then
echo "`date`: killed teams" >> $log
fi
pkill -9 teams
fi