Changes
Jump to navigation
Jump to search
← Older edit
BASH
(view source)
Revision as of 14:19, 13 April 2021
3 bytes added
,
14:19, 13 April 2021
m
→Killswitch When ssh user logs in
Line 205:
Line 205:
==Extras==
==Extras==
−
=== Killswitch When ssh user logs in ===
+
===Killswitch When ssh user logs in===
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#!/bin/bash
#!/bin/bash
ME=10.0.253.131
ME=10.0.253.131
−
OTHER=$( who | grep -v tmux | grep -v ${ME} )
+
while true; do
while true; do
+
OTHER=$( who | grep -v tmux | grep -v ${ME} )
if [ -z "${OTHER}" ]; then
if [ -z "${OTHER}" ]; then
echo "No one"
echo "No one"
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version