lynxthecat / cake-autorate

Eliminate the excess latency and jitter terrorizing your 4G, 5G, LTE, Starlink or other variable rate connection!
https://www.bufferbloat.net
GNU General Public License v2.0
263 stars 24 forks source link

More congenial setup.sh updates #293

Closed lynxthecat closed 3 months ago

lynxthecat commented 4 months ago

Could the setup script check that it is the latest version, and if not then perhaps offer to overwrite itself with the latest version?

To help avoid situations like this:

BusyBox v1.36.1 (2024-04-03 00:56:56 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 23.05.3, r23809-234f1a2efa
 -----------------------------------------------------
root@OpenWrt-1:~# cd cake-autorate/
root@OpenWrt-1:~/cake-autorate# ./setup.sh
At least one instance of cake-autorate appears to be running - exiting
If you want to install a new version, first stop any running instance of cake-autorate
If you are sure that no instance of cake-autorate is running, delete the /var/run/cake-autorate directory
root@OpenWrt-1:~/cake-autorate# service cake-autorate stop
root@OpenWrt-1:~/cake-autorate# ./setup.sh
Installing cake-autorate in /root/cake-autorate...
Previous configuration present - keep it? [Y/n]
mv: can't rename '/tmp/tmp.NJfmff/launcher.sh': No such file or directory
root@OpenWrt-1:~/cake-autorate# ./setup.sh
Installing cake-autorate in /root/cake-autorate...
Previous configuration present - keep it? [Y/n]
mv: can't rename '/tmp/tmp.eihdno/launcher.sh': No such file or directory
root@OpenWrt-1:~/cake-autorate# wget https://raw.githubusercontent.com/lynxthecat/cake-autorate/master/setup.sh
Downloading 'https://raw.githubusercontent.com/lynxthecat/cake-autorate/master/setup.sh'
Connecting to 185.199.111.133:443
Writing to 'setup.sh'
setup.sh             100% |*******************************|  6806   0:00:00 ETA
Download completed (6806 bytes)
root@OpenWrt-1:~/cake-autorate# ./setup.sh
-ash: ./setup.sh: Permission denied
root@OpenWrt-1:~/cake-autorate# chmod +x setup.sh
root@OpenWrt-1:~/cake-autorate# ./setup.sh
Detected Operating System: openwrt
Installation directories for detected Operating System:
  - Script prefix: /root/cake-autorate
  - Config prefix: /root/cake-autorate
Continue with installation? [Y/n]
Installing cake-autorate using /root/cake-autorate (script) and /root/cake-autorate (config) directories...
Previous configuration present - keep it? [Y/n]
Using prior configuration

3.2.0-PRERELEASE successfully installed, but not yet running

Start the software manually with:
   cd /root/cake-autorate; ./cake-autorate.sh
Run as a service with:
   service cake-autorate enable; service cake-autorate start

root@OpenWrt-1:~/cake-autorate# service cake-autorate stop
Command failed: Not found
root@OpenWrt-1:~/cake-autorate# service cake-autorate start
rany2 commented 4 months ago

I could work on this if you like, it shouldn't be too complicated really.

lynxthecat commented 4 months ago

No rush.