summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-06-18 00:37:51 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-06-18 00:37:51 +0900
commitfd11896606a10ca366d82e9f726c30d513c41278 (patch)
treec871e9460457477d35495b36d3fafd43b7f429f2
parentb8693116f9b83678cefdd468e065c11ff5d13955 (diff)
Init
-rwxr-xr-xpublic/thesiah.sh4
-rwxr-xr-xstatic/thesiah.sh4
2 files changed, 4 insertions, 4 deletions
diff --git a/public/thesiah.sh b/public/thesiah.sh
index 5120465..19a8a0a 100755
--- a/public/thesiah.sh
+++ b/public/thesiah.sh
@@ -495,11 +495,11 @@ STOP_CHARGE_THRESH_BAT1=75" > /etc/tlp.d/01-battery.conf
tlp start >/dev/null 2>&1
}
-tlpsetup() {
+sshsetup() {
whiptail --infobox "Setting up ssh..." 7 50
[ -x "$(command -v "ssh")" ] || installpkg openssh
pacman -Qq openssh-"$initsys" >/dev/null 2>&1 || installpkg openssh-"$initsys"
- sed -Ei "s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config
+ sed -Ei "/^#Port\s*22$/s/#//;s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config >/dev/null 2>&1
case "$initsys" in
"runit")
ln -sf /etc/runit/sv/sshd /run/runit/service/ >/dev/null 2>&1
diff --git a/static/thesiah.sh b/static/thesiah.sh
index 5120465..19a8a0a 100755
--- a/static/thesiah.sh
+++ b/static/thesiah.sh
@@ -495,11 +495,11 @@ STOP_CHARGE_THRESH_BAT1=75" > /etc/tlp.d/01-battery.conf
tlp start >/dev/null 2>&1
}
-tlpsetup() {
+sshsetup() {
whiptail --infobox "Setting up ssh..." 7 50
[ -x "$(command -v "ssh")" ] || installpkg openssh
pacman -Qq openssh-"$initsys" >/dev/null 2>&1 || installpkg openssh-"$initsys"
- sed -Ei "s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config
+ sed -Ei "/^#Port\s*22$/s/#//;s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config >/dev/null 2>&1
case "$initsys" in
"runit")
ln -sf /etc/runit/sv/sshd /run/runit/service/ >/dev/null 2>&1