From a546a061afd09be99b9cd116096d524e0dedc593 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Sat, 15 Jul 2023 19:34:35 -0700 Subject: [PATCH] updated sp.sh --- for_new_sovran_pros/sp.sh | 41 ++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/for_new_sovran_pros/sp.sh b/for_new_sovran_pros/sp.sh index 824ad22..726c351 100644 --- a/for_new_sovran_pros/sp.sh +++ b/for_new_sovran_pros/sp.sh @@ -282,23 +282,6 @@ echo "free:a" | chpasswd -c SHA512 sudo -u free flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak update -# - -mkdir /root/.ssh - -mkdir -p /home/free/.ssh - -touch /root/.ssh/authorized_keys - -sudo -u free ssh-keygen -q -N "gosovransystems" -t ed25519 -f /home/free/.ssh/factory_login - -echo "$(cat /home/free/.ssh/factory_login.pub)" >> /root/.ssh/authorized_keys - -chown free:users /home/free/.ssh -R - -chmod 700 /home/free/.ssh -R - - # rm -rf /root/sp.sh @@ -347,7 +330,6 @@ popd # - mkdir -p /home/free/Pictures pushd /home/free/Downloads @@ -361,6 +343,29 @@ pushd /home/free/Downloads popd # + +wp=$(cat /var/lib/secrets/wordpressdb) + +sudo mysql -u root -e "SET PASSWORD FOR wpusr@localhost = PASSWORD('${wp}')"; + +# + +mkdir /root/.ssh + +mkdir -p /home/free/.ssh + +touch /root/.ssh/authorized_keys + +sudo -u free ssh-keygen -q -N "gosovransystems" -t ed25519 -f /home/free/.ssh/factory_login + +echo "$(cat /home/free/.ssh/factory_login.pub)" >> /root/.ssh/authorized_keys + +chown free:users /home/free/.ssh -R + +chmod 700 /home/free/.ssh -R + +# + sudo matrix-synapse-register_new_matrix_user -u admin -p a -a sudo echo "no" | matrix-synapse-register_new_matrix_user -u test -p a