Skip to content

Commit

Permalink
Develop (#406)
Browse files Browse the repository at this point in the history
* Update rtinst

* Update rtinst

* Update rtsslcert

* Update rtsslcert

* Update rtsslcert

* Update rtsslcert

* Update rtsslcert

* Update rtinst

* Update rtupdate
  • Loading branch information
arakasi72 authored May 11, 2019
1 parent 54f12f7 commit 37354f3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
25 changes: 23 additions & 2 deletions scripts/rtinst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,29 @@ if [ "$relno" = "18" ]; then
libcver=libcurl4
fi

export serverip=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
# export serverip=$(wget -qO- ipecho.net/plain)
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
serveripb=$(wget -qO- ipecho.net/plain)

if [ "$serveripa" = "$serveripb" ]; then
export serverip=$serveripa
else
echo "Select the IP address to use:"
echo "1.) "$serveripa
echo "2.) "$serveripb

while true
do
read answer
case $answer in [1] ) export serverip=$serveripa && break ;;
[2] ) export serverip=$serveripb && break ;;
* ) echo "Enter 1 or 2";;
esac
done
fi

echo "IP set to "$serverip


export logfile="/dev/null"
webpass=''
cronline1="@reboot sleep 10; /usr/local/bin/rtcheck irssi rtorrent"
Expand Down
27 changes: 21 additions & 6 deletions scripts/rtsslcert
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#
#########################################################################################


forceyes=1
headless=1
selfsign=1
Expand Down Expand Up @@ -95,11 +94,27 @@ if [ $# -gt 0 ]; then
fi

if [ -z $serverip ]; then
serverip=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
elif ! valid_ip $serverip; then
echo "$serverip is not a valid IP address"
serverip=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
echo "will use $serverip instead"
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
serveripb=$(wget -qO- ipecho.net/plain)
if [ "$serveripa" = "$serveripb" ]; then
serverip=$serveripa
else
echo "Select the IP address to use:"
echo "1.) "$serveripa
echo "2.) "$serveripb

while true
do
read answer
case $answer in [1] ) serverip=$serveripa && break ;;
[2] ) serverip=$serveripb && break ;;
* ) echo "Enter 1 or 2";;
esac
done
fi

echo "IP set to "$serverip
echo
fi

serverdn=$(perl -MSocket -le "print((gethostbyaddr(inet_aton('$serverip'), AF_INET))[0])")
Expand Down
2 changes: 1 addition & 1 deletion scripts/rtupdate
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ make -s install >> $logfile 2>&1
cd ../rtorrent-$rtvers
echo "Installing rtorrent" | tee -a $logfile
./autogen.sh >> $logfile 2>&1
./configure --prefix=/usr --with-xmlrpc-c >> $logfile 2>&1
./configure --prefix=/usr --with-xmlrpc-c --enable-ipv6 >> $logfile 2>&1
make -j$(nproc) >> $logfile 2>&1
make -s install >> $logfile 2>&1
ldconfig >> $logfile 2>&1
Expand Down

0 comments on commit 37354f3

Please sign in to comment.