Install once only
This commit is contained in:
parent
3eed806474
commit
259dbe47b5
|
@ -3524,13 +3524,20 @@ function install_tor {
|
|||
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_tor" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
apt-get -y install tor
|
||||
echo 'install_tor' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function enable_ssh_via_onion {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "enable_ssh_via_onion" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
apt-get -y install tor connect-proxy
|
||||
if ! grep -q 'Host *.onion' /home/$MY_USERNAME/.ssh/config; then
|
||||
if [ ! -d /home/$MY_USERNAME/.ssh ]; then
|
||||
|
@ -3548,6 +3555,7 @@ function enable_ssh_via_onion {
|
|||
echo 'Host *.onion' >> /root/.ssh/config
|
||||
echo 'ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p' >> /root/.ssh/config
|
||||
fi
|
||||
echo 'enable_ssh_via_onion' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function install_editor {
|
||||
|
|
Loading…
Reference in New Issue