mirror of
https://github.com/elisspace/rtinst.git
synced 2026-08-29 15:44:06 +00:00
58 lines
1.6 KiB
Bash
Executable File
58 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
######################################################################
|
|
#
|
|
# Copyright (c) 2015 arakasi72 (https://github.com/arakasi72)
|
|
#
|
|
# --> Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
|
#
|
|
######################################################################
|
|
|
|
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin
|
|
|
|
rtdstatus=$(rtdload)
|
|
|
|
select_task(){
|
|
while true
|
|
do
|
|
read answer
|
|
case $answer in [1] ) rtgetscripts && return 0 ;;
|
|
[2] ) rtadduser && return 0 ;;
|
|
[3] ) rtremove && return 0 ;;
|
|
[4] ) rtdload $rtdaction && return 0 ;;
|
|
[5] ) rtupdate && return 0 ;;
|
|
[6] ) rutupgrade && return 0 ;;
|
|
[7] ) rtwebmin && return 0 ;;
|
|
[Qq] ) exit ;;
|
|
* ) echo "Enter 1-7 (q to quit)";;
|
|
esac
|
|
done
|
|
}
|
|
|
|
if [ "$(id -u)" != "0" ]; then
|
|
echo "Must be run as root, or with sudo"
|
|
exit 1
|
|
fi
|
|
|
|
if [ $rtdstatus = enabled ]; then
|
|
rtdaction=disable
|
|
elif [ $rtdstatus = disabled ]; then
|
|
rtdaction=enable
|
|
fi
|
|
|
|
clear
|
|
|
|
echo "For more information go to:"
|
|
echo "https://github.com/arakasi72/rtinst/blob/master/README.md"
|
|
echo "Select from the following options:"
|
|
echo "1.) rtgetscripts - update the rtinst scripts"
|
|
echo "2.) rtadduser - add new user"
|
|
echo "3.) rtremove - delete a user"
|
|
echo "4.) rtdload $rtdaction - $rtdaction http downloads"
|
|
echo "5.) rtupdate - up/down-grade rtorent/libtorrent"
|
|
echo "6.) rutupgrade - upgrade to latest version of RuTorrent"
|
|
echo "7.) rtwebmin - install webmin"
|
|
echo "Enter option or q to quit"
|
|
|
|
select_task
|