Browse Source

fix absolute paths #2

main
ghost 3 years ago
parent
commit
c4c7dc1715
  1. 16
      twister-cli-installer.sh

16
twister-cli-installer.sh

@ -51,13 +51,13 @@ function install() {
read -rp "Configure for ARM? [y/n]: " -e ARM read -rp "Configure for ARM? [y/n]: " -e ARM
done done
mkdir ~/.twister mkdir $HOME/.twister
touch ~/.twister/twister.conf touch $HOME/.twister/twister.conf
chmod 600 ~/.twister/twister.conf chmod 600 $HOME/.twister/twister.conf
git clone https://github.com/$EDITION/twister-html.git ~/.twister/html git clone https://github.com/$EDITION/twister-html.git $HOME/.twister/html
if [[ $EDITION == "twisterarmy" ]]; then if [[ $EDITION == "twisterarmy" ]]; then
cd ~/.twister/html cd $HOME/.twister/html
git checkout twisterarmy git checkout twisterarmy
fi fi
@ -76,14 +76,14 @@ function install() {
read -rp "Enter RPC password: " -e PASSWORD read -rp "Enter RPC password: " -e PASSWORD
done done
echo -e "rpcuser=$USER_NAME\nrpcpassword=$PASSWORD" > ~/.twister/twister.conf echo -e "rpcuser=$USER_NAME\nrpcpassword=$PASSWORD" > $HOME/.twister/twister.conf
until [[ $SSL =~ (y|n) ]]; do until [[ $SSL =~ (y|n) ]]; do
read -rp "Enable SSL connection? [y/n]: " -e SSL read -rp "Enable SSL connection? [y/n]: " -e SSL
done done
if [[ $SSL == "y" ]]; then if [[ $SSL == "y" ]]; then
openssl req -x509 -newkey rsa:4096 -keyout ~/.twister/key.pem -out ~/.twister/cert.pem -days 365 -nodes openssl req -x509 -newkey rsa:4096 -keyout $HOME/.twister/key.pem -out $HOME/.twister/cert.pem -days 365 -nodes
echo -e "rpcallowip=*\nrpcuser=$USER_NAME\nrpcpassword=$PASSWORD\nrpcsslcertificatechainfile=~/.twister/cert.pem\nrpcsslprivatekeyfile=~/.twister/key.pem" > ~/.twister/twister.conf echo -e "rpcallowip=*\nrpcuser=$USER_NAME\nrpcpassword=$PASSWORD\nrpcsslcertificatechainfile=$HOME/.twister/cert.pem\nrpcsslprivatekeyfile=$HOME/.twister/key.pem" > $HOME/.twister/twister.conf
fi fi
echo "Check firewall rules..." echo "Check firewall rules..."

Loading…
Cancel
Save