diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-06-21 05:39:07 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-06-21 05:39:07 +0900 |
| commit | 654da65f5d03027e1589bb419dda7a92585d132d (patch) | |
| tree | d7536e17abe0351501ef1c905f9a349db7bb2543 | |
| parent | 8d2d69411be3fa24a610afa1609614b9bfc12425 (diff) | |
Init
| -rwxr-xr-x | public/thesiah.sh | 9 | ||||
| -rwxr-xr-x | static/thesiah.sh | 7 |
2 files changed, 11 insertions, 5 deletions
diff --git a/public/thesiah.sh b/public/thesiah.sh index a413fe9..9c90a75 100755 --- a/public/thesiah.sh +++ b/public/thesiah.sh @@ -513,7 +513,7 @@ 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 "/^#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 + sed -Ei "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 @@ -543,8 +543,11 @@ vpnsetup() { elogindsetup() { [ -d /etc/elogind/logind.conf.d ] || mkdir -p /etc/elogind/logind.conf.d 2>/dev/null - echo "HandleLidSwitch=ignore -HandleLidSwitchDocked=ignore" > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/null + printf '[Login] +HandleLidSwitch=ignore +HandleLidSwitchExternalPower=ignore +HandleLidSwitchDocked=ignore +LidSwitchIgnoreInhibited=no' > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/null ln -sf /etc/runit/sv/elogind /run/runit/service/ sv start elogind || sv force-reload elogind >/dev/null 2>&1 } diff --git a/static/thesiah.sh b/static/thesiah.sh index 6acccec..9c90a75 100755 --- a/static/thesiah.sh +++ b/static/thesiah.sh @@ -543,8 +543,11 @@ vpnsetup() { elogindsetup() { [ -d /etc/elogind/logind.conf.d ] || mkdir -p /etc/elogind/logind.conf.d 2>/dev/null - echo "HandleLidSwitch=ignore -HandleLidSwitchDocked=ignore" > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/null + printf '[Login] +HandleLidSwitch=ignore +HandleLidSwitchExternalPower=ignore +HandleLidSwitchDocked=ignore +LidSwitchIgnoreInhibited=no' > /etc/elogind/logind.conf.d/00-lid.conf 2>/dev/null ln -sf /etc/runit/sv/elogind /run/runit/service/ sv start elogind || sv force-reload elogind >/dev/null 2>&1 } |
