Skip to content

Commit

Permalink
fomat script
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms committed Apr 4, 2024
1 parent 0c05a45 commit 0f807cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/set.ssh.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ ${#1} -eq 0 ]||[ $1 = "-h" ]||[ $1 = "--help" ];then
if [ ${#1} -eq 0 ] || [ $1 = "-h" ] || [ $1 = "--help" ]; then
echo "Enable or disable ssh access with the joinmarket user"
echo "sudo set.ssh.sh [off|on]"
echo
Expand All @@ -18,7 +18,7 @@ if ! grep -Eq "^joinmarketSSH=" /home/joinmarket/joinin.conf; then
fi

echo
if [ "$1" = "off" ];then
if [ "$1" = "off" ]; then
echo "# Disable ssh access with the joinmarket user"
if ! grep -Eq "^DenyUsers joinmarket" /etc/ssh/sshd_config; then
echo "DenyUsers joinmarket" | tee -a /etc/ssh/sshd_config
Expand All @@ -35,4 +35,4 @@ elif [ "$1" = "on" ]; then
else
echo "# Invalid option $*"
exit 1
fi
fi

0 comments on commit 0f807cf

Please sign in to comment.