mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-23 10:57:13 +00:00
parent
a4c4c5ec2c
commit
e031c73e3a
@ -3,8 +3,8 @@
|
||||
# Skip on weekends
|
||||
exit if Time.now.saturday? || Time.now.sunday?
|
||||
|
||||
# Exit early if no sessions with my_username are found
|
||||
exit if `who`[/my_username/].nil?
|
||||
# Exit early if no sessions with my username are found
|
||||
exit unless `who -q`.include? ENV['USER']
|
||||
|
||||
require 'net/telnet'
|
||||
|
||||
|
@ -10,8 +10,8 @@ Dir.mkdir('logs') unless File.exists?(log_file_name)
|
||||
|
||||
LOG_FILE = File.open(log_file_name, 'a+')
|
||||
|
||||
# Exit early if sessions with my_username are found
|
||||
exit unless `who`[/my_username/].nil?
|
||||
# Exit early if sessions with my username are found
|
||||
exit if `who -q`.include? ENV['USER']
|
||||
|
||||
require 'dotenv'
|
||||
require 'twilio-ruby'
|
||||
|
@ -7,7 +7,7 @@ if [ "$DAYOFWEEK" -eq 6 ] || [ "$DAYOFWEEK" -eq 7 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Exit early if any session with my_username is found
|
||||
# Exit early if any session with my username is found
|
||||
if who | grep -wq $USER; then
|
||||
exit
|
||||
fi
|
||||
|
@ -7,8 +7,8 @@ if [ "$DAYOFWEEK" -eq 6 ] || [ "$DAYOFWEEK" -eq 7 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Exit early if no sessions with my_username are found
|
||||
if ! who | grep -wq 'my_username'; then
|
||||
# Exit early if no sessions with my username are found
|
||||
if ! who | grep -wq $USER; then
|
||||
exit
|
||||
fi
|
||||
|
||||
|
@ -10,8 +10,8 @@ Dir.mkdir('logs') unless File.exists?(log_file_name)
|
||||
|
||||
LOG_FILE = File.open(log_file_name, 'a+')
|
||||
|
||||
# Exit early if no sessions with my_username are found
|
||||
exit if `who`[/my_username/].nil?
|
||||
# Exit early if no sessions with my username are found
|
||||
exit if `who -q`.include? ENV['USER']
|
||||
|
||||
require 'dotenv'
|
||||
require 'twilio-ruby'
|
||||
|
Loading…
x
Reference in New Issue
Block a user