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