updated reseter source script and icon

This commit is contained in:
naturallaw77 2023-06-09 15:16:26 -07:00
parent 38d0f70ab4
commit a5aa692708
4 changed files with 128 additions and 116 deletions

View File

@ -23,72 +23,70 @@ else
#### Initial Reseter Tag #### Initial Reseter Tag
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'mkdir /var/lib/reseter ; touch /var/lib/reseter/started' ssh -i /home/free/.ssh/factory_login root@${ID} 'mkdir /var/lib/reseter ; touch /var/lib/reseter/started'
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Create New Directory for Reseter Tag"
exit 1
fi
rm -rf /home/free/.ssh/sovranpro_login
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Delete Old Sovran Private Keys"
exit 1
fi
rm -rf /home/free/.ssh/sovranpro_login.pub
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Delete Old Sovran Pro Public Keys"
exit 1
fi
PASSWDNEW=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password")
ssh-keygen -q -N "$PASSWDNEW" -t ed25519 -f /home/free/.ssh/sovranpro_login
if [[ $? -eq 1 ]]; then
exit 2
elif [[ $? != 0 ]]; then
zenity --error \ zenity --error \
--ellipsize \ --ellipsize \
--no-wrap \ --no-wrap \
--title="Sovran_SystemsOS_Reseter" \ --title="Sovran_SystemsOS_Reseter" \
--text="Could Not Reset Sovran Pro Login Passwords" --text="Could Not Start, Already Completed"
exit 1 exit 1
fi
PASS=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password")
if [[ $? -eq 1 ]]; then
exit 1
else else
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'sed -i -e "0,/ssh-ed25519.*/{ s::$(cat /home/free/.ssh/sovranpro_login.pub): }" /root/.ssh/authorized_keys'
ssh-keygen -q -N "${PASS}" -t ed25519 -f /home/free/.ssh/sovranpro_login
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Create New Login Key"
exit 1
fi
ssh -i /home/free/.ssh/factory_login root@${ID} 'sed -i -e "0,/ssh-ed25519.*/{ s::$(cat /home/free/.ssh/sovranpro_login.pub): }" /root/.ssh/authorized_keys'
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Move Key to Root"
exit 1
fi
fi
rm -rf /home/free/.ssh/factory_login /home/free/.ssh/factory_login.pub
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Factory Keys"
exit 1
fi
fi fi
@ -434,6 +432,35 @@ zenity --error \
fi fi
#### RESET LND AND RTL ####
ssh -i /home/free/.ssh/sovranpro_login root@${ID} << 'EOF'
systemctl stop bitcoind lnd lightning-loop lightning-pool rtl
rm -rf /var/lib/lightning-loop /var/lib/lightning-pool /var/lib/lnd
echo -n $(pwgen -s 33 -1) > /etc/nix-bitcoin-secrets/rtl-password
nixos-rebuild switch --impure
EOF
if [[ $? != 0 ]]; then
zenity --error \
--ellipsize \
--no-wrap \
--title="Sovran_SystemsOS_Reseter" \
--text="Could Not Reset LND or RTL Passwords"
exit 1
fi
#### FINAL RESETER TAG #### #### FINAL RESETER TAG ####
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'touch /var/lib/reseter/completed' ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'touch /var/lib/reseter/completed'

View File

@ -23,55 +23,23 @@
inkscape:deskcolor="#505050" inkscape:deskcolor="#505050"
showgrid="false" showgrid="false"
inkscape:zoom="5.2149125" inkscape:zoom="5.2149125"
inkscape:cx="38.73507" inkscape:cx="17.162321"
inkscape:cy="92.810761" inkscape:cy="64.622369"
inkscape:window-width="2560" inkscape:window-width="2560"
inkscape:window-height="1512" inkscape:window-height="1512"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="0" inkscape:window-y="0"
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:current-layer="svg96" /><defs inkscape:current-layer="layer2" /><defs
id="defs67"><linearGradient id="defs67"><linearGradient
inkscape:collect="always" inkscape:collect="always"
id="linearGradient4659"><stop id="linearGradient936"><stop
style="stop-color:#00ff17;stop-opacity:0.66984993;" style="stop-color:#1e8e11;stop-opacity:1;"
offset="0" offset="0"
id="stop4657" /><stop id="stop932" /><stop
style="stop-color:#000000;stop-opacity:0.17596982;" style="stop-color:#1bff00;stop-opacity:0;"
offset="1" offset="1"
id="stop4655" /></linearGradient><inkscape:path-effect id="stop934" /></linearGradient><linearGradient
effect="fillet_chamfer"
id="path-effect4589"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,3,0,1 @ F,0,0,1,0,3,0,1 @ F,0,0,1,0,3,0,1 @ F,0,0,1,0,3,0,1"
unit="px"
method="auto"
mode="F"
radius="3"
chamfer_steps="1"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" /><inkscape:path-effect
effect="fillet_chamfer"
id="path-effect1212"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,34,0,18 @ F,0,0,1,0,34,0,18 @ F,0,0,1,0,34,0,18 @ F,0,0,1,0,34,0,18"
unit="px"
method="auto"
mode="F"
radius="34"
chamfer_steps="18"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" /><linearGradient
id="linearGradient1028" id="linearGradient1028"
inkscape:swatch="solid"><stop inkscape:swatch="solid"><stop
style="stop-color:#000000;stop-opacity:1;" style="stop-color:#000000;stop-opacity:1;"
@ -234,14 +202,14 @@
<linearGradient <linearGradient
inkscape:collect="always" inkscape:collect="always"
xlink:href="#linearGradient4659" xlink:href="#linearGradient936"
id="linearGradient4661" id="linearGradient938"
x1="34.703756" x1="-48.519272"
y1="52.957031" y1="18.511358"
x2="93.296244" x2="287.07454"
y2="52.957031" y2="18.511358"
gradientUnits="userSpaceOnUse" gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-2)" /></defs><path gradientTransform="matrix(1.1020247,0,0,1.1097375,37.198581,-10.424856)" /></defs><path
style="fill:#f5f5f3;fill-opacity:1;fill-rule:nonzero;stroke:none" style="fill:#f5f5f3;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 20,11.957031 h 88 c 4.41797,0 8,3.582031 8,8 V 108 c 0,4.41797 -3.58203,8 -8,8 H 20 c -4.417969,0 -8,-3.58203 -8,-8 V 19.957031 c 0,-4.417969 3.582031,-8 8,-8 z m 0,0" d="m 20,11.957031 h 88 c 4.41797,0 8,3.582031 8,8 V 108 c 0,4.41797 -3.58203,8 -8,8 H 20 c -4.417969,0 -8,-3.58203 -8,-8 V 19.957031 c 0,-4.417969 3.582031,-8 8,-8 z m 0,0"
id="path69" /><path id="path69" /><path
@ -254,15 +222,20 @@
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer2" id="layer2"
inkscape:label="Layer 1" inkscape:label="Layer 1"
transform="matrix(0.1816,0,0,0.1816,35.224187,79.037164)" /><g transform="matrix(0.1816,0,0,0.1816,35.224187,79.037164)"><ellipse
id="g926" fill="#54c147"
transform="translate(0,2)"><ellipse cx="168.64549"
style="fill:url(#linearGradient4661);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0" cy="10.117889"
id="path4648" id="circle8314"
cx="65.02356" rx="184.91634"
cy="76.156929" ry="179.91556"
rx="36.648121" style="fill:url(#linearGradient938);fill-opacity:1;stroke-width:1.71591" /><g
ry="35.434738" /><path id="g1415"
d="m 52.359616,69.040922 h 0.952751 v -2.911535 c 0,-3.381838 1.312582,-6.460148 3.427794,-8.69525 2.123441,-2.245108 5.055769,-3.638335 8.283396,-3.638335 3.227964,0 6.159958,1.393227 8.284059,3.638003 2.114883,2.2351 3.427463,5.313744 3.427463,8.695248 v 2.911535 h 0.952752 c 0.790446,0 1.508795,0.326878 2.028626,0.853884 0.519833,0.527002 0.842795,1.254471 0.842795,2.055317 v 19.922795 c 0,0.800844 -0.322633,1.52864 -0.842795,2.055318 -0.52016,0.526668 -1.23818,0.853874 -2.028626,0.853874 H 52.359616 c -0.790777,0 -1.508796,-0.326874 -2.028957,-0.853874 -0.520161,-0.527011 -0.842792,-1.253806 -0.842792,-2.054994 V 71.950124 c 0,-0.800848 0.322962,-1.52865 0.842792,-2.05532 0.520161,-0.526672 1.23818,-0.853882 2.028957,-0.853882 z m 11.613744,13.873909 -1.379414,3.662016 h 4.859883 l -1.278673,-3.712379 c 0.811516,-0.423605 1.366246,-1.280827 1.366246,-2.269127 0,-1.408571 -1.127565,-2.550638 -2.517512,-2.550638 -1.390281,0 -2.517843,1.142401 -2.517843,2.550638 -3.47e-4,1.028992 0.601147,1.915891 1.467313,2.31949 z M 55.332434,69.040922 h 19.382578 v -2.911535 c 0,-2.838823 -1.094973,-5.415478 -2.859568,-7.280008 -1.755379,-1.85519 -4.173467,-3.006596 -6.831887,-3.006596 -2.658413,0 -5.076505,1.151406 -6.831886,3.006261 -1.764266,1.864533 -2.859567,4.441187 -2.859567,7.280009 v 2.911869 z m 22.355397,2.046982 H 52.359616 c -0.233084,0 -0.445428,0.0974 -0.60016,0.254164 -0.154731,0.156767 -0.250863,0.372236 -0.250863,0.608056 v 19.922784 c 0,0.23582 0.09614,0.451296 0.250863,0.60773 0.154732,0.1571 0.367404,0.254167 0.60016,0.254167 h 25.328545 c 0.233083,0 0.445758,-0.09707 0.600159,-0.254167 0.154732,-0.156768 0.250863,-0.37191 0.250863,-0.60773 V 71.950124 c 0,-0.23582 -0.09614,-0.451289 -0.250863,-0.608056 -0.155061,-0.156766 -0.367405,-0.254164 -0.600489,-0.254164 z" style="fill:#ffffff;fill-opacity:0;stroke:#ffffff;stroke-width:92.70891519;stroke-dasharray:none;stroke-opacity:1"
id="path531" transform="matrix(0.33499765,0,0,0.33499765,365.80604,52.473845)"><path
style="fill:#ffffff;fill-opacity:1;stroke-width:0.331373" /></g></svg> style="fill:#ffffff;fill-opacity:0;stroke:#ffffff;stroke-width:92.70891519;stroke-dasharray:none;stroke-opacity:1"
d="m -376.71488,-211.58914 h -423.65088 c -3.89867,0 -7.45044,1.60793 -10.03854,4.19604 -2.58811,2.5881 -4.19604,6.14537 -4.19604,10.03854 v 328.90969 c 0,3.89318 1.60793,7.45044 4.19604,10.03304 2.5881,2.59362 6.14537,4.19604 10.03854,4.19604 h 423.65639 c 3.89868,0 7.45595,-1.60242 10.03855,-4.19604 2.5881,-2.5881 4.19603,-6.13986 4.19603,-10.03304 v -328.90969 c 0,-3.89317 -1.60793,-7.45044 -4.19603,-10.03854 -2.59361,-2.58811 -6.14538,-4.19604 -10.04406,-4.19604 z"
id="path1409" /><path
style="fill:#ffffff;fill-opacity:0;stroke:#ffffff;stroke-width:92.70891519;stroke-dasharray:none;stroke-opacity:1"
d="m -800.36576,-245.38319 h 15.93613 v -48.06718 c 0,-55.8315 21.95484,-106.65198 57.3348,-143.55176 35.51762,-37.06498 84.56497,-60.06608 138.55176,-60.06608 53.99229,0 103.03414,23.0011 138.56278,60.06057 35.37445,36.89978 57.32929,87.72577 57.32929,143.55176 v 48.06718 h 15.93612 c 13.22137,0 25.23679,5.39648 33.93172,14.09692 8.69494,8.70044 14.09692,20.71035 14.09692,33.93172 v 328.90969 c 0,13.22136 -5.39648,25.23678 -14.09692,33.93172 -8.70044,8.69493 -20.71035,14.09691 -33.93172,14.09691 h -423.65088 c -13.22687,0 -25.23678,-5.39647 -33.93722,-14.09691 -8.70044,-8.70045 -14.09692,-20.69934 -14.09692,-33.92622 v -328.90969 c 0,-13.22136 5.40198,-25.23678 14.09692,-33.93172 8.70044,-8.69493 20.71035,-14.09691 33.93722,-14.09691 z"
id="path776" /></g></g></svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Sovran_SystemsOS Updater
Exec=/home/free/.Sovran_Systems/localscript_to_remote_updater.sh
Icon=/home/free/.Sovran_Systems/Icon/Sovran_SystemsOS_Updater_Iconv3.svg

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
bash -c "$(curl https://git.sovransystems.com/Sovran_Systems/Software/raw/branch/main/Sovran_SystemsOS_Updater/Updater%20Source%20Files/Update_Sovran_SystemsOS.sh)"
exit