2
0
mirror of https://github.com/narkoz/hacker-scripts synced 2025-08-28 13:17:44 +00:00

Use variable $USER variable

So anyone can put this in their crontab.
This commit is contained in:
Dan Church 2015-11-23 09:15:40 -06:00
parent 8260c7dca5
commit 934e4de471

View File

@ -8,7 +8,7 @@ if [ "$DAYOFWEEK" -eq 6 ] || [ "$DAYOFWEEK" -eq 7 ]; then
fi
# Exit early if any session with my_username is found
if who | grep -wq 'my_username'; then
if who | grep -wq $USER; then
exit
fi