Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
BASH
(view source)
Revision as of 11:33, 6 April 2021
303 bytes added
,
11:33, 6 April 2021
m
→Set files and folder permissions
Line 205:
Line 205:
==Extras==
==Extras==
−
=== Set files and folder permissions ===
+
=== Killswitch When ssh user logs in ===
+
<syntaxhighlight lang="bash">
+
#!/bin/bash
+
ME=10.0.253.131
+
OTHER=$( who | grep -v tmux | grep -v ${ME} )
+
while true; do
+
if [ -z "${OTHER}" ]; then
+
echo "No one"
+
else
+
tmux kill-session -t test
+
fi
+
sleep 5
+
done
+
</syntaxhighlight><br />
+
===Set files and folder permissions===
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#!/bin/sh
#!/bin/sh
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