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
269 stars 24 forks source link

Rename files to be less verbose about it belonging to cake-autorate #198

Closed rany2 closed 1 year ago

rany2 commented 1 year ago

setup.sh

documentation

lynxthecat commented 1 year ago

How about:

# DO NOT MODIFY THIS FILE. ANY CHANGES NEED TO BE MADE TO
# THE CONFIG FILE FOR A GIVEN INSTANCE OF CAKE_AUTORATE. 
# MODIFYING THIS FILE WILL RESULT IN THE LOSS OF ANY CHANGES  
# DURING AN UPDATE OR UNEXPECTED BEHAVIOR AFTER AN UPDATE 
# IF THE OLD DEFAULT FILE WAS IN USE.
#
# THIS FILE MAY BE CONSULTED TO LEARN WHICH VARIABLES TO
# OVERRIDE IN A CONFIG FILE.
rany2 commented 1 year ago

@lynxthecat Could you test this for me, just change the repo in setup.sh to rany2 and it should work

lynxthecat commented 1 year ago
Installing cake-autorate in /root/cake-autorate...
sh: cake-autorate_config.primary.sh: unknown operand
mv: can't rename '/tmp/tmp.JeEeAk/cake-autorate_config.primary.sh': No such file or directory
rany2 commented 1 year ago

@lynxthecat try now

lynxthecat commented 1 year ago
root@OpenWrt-1:~/cake-autorate# sh setup.sh
Installing cake-autorate in /root/cake-autorate...
sh: cake-autorate_config.primary.sh: unknown operand
mv: can't rename '/tmp/tmp.bPKJap/defaults.sh': No such file or directory
rany2 commented 1 year ago

@lynxthecat are you sure you're testing the latest one with my repo?

lynxthecat commented 1 year ago

Now I see this:

root@OpenWrt-1:~/cake-autorate# sh setup.sh
Installing cake-autorate in /root/cake-autorate...
sh: cake-autorate_config.primary.sh: unknown operand
mv: can't rename '/tmp/tmp.HgAPhM/config.primary.sh': No such file or directory
rany2 commented 1 year ago

@lynxthecat works OK in my VM, maybe you didn't replace all instances of lynxthecat with rany2 in your setup.sh?

lynxthecat commented 1 year ago

Doh, yes.

rany2 commented 1 year ago

also doesn't seem like you're using my setup.sh file, i think

lynxthecat commented 1 year ago

I think I am. I just didn't rename. Does half a glass of wine justify this to some small extent?

lynxthecat commented 1 year ago
root@OpenWrt-1:~/cake-autorate# sh setup.sh
Installing cake-autorate in /root/cake-autorate...
sh: cake-autorate_config.primary.sh: unknown operand

Now edit the config.primary.sh file as described in:
   https://github.com/rany2/CAKE-autorate#installation-on-openwrt

2.0.0 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# ls
cake-autorate.sh                 config.primary.sh                launcher.sh                      setup.sh
cake-autorate_config.primary.sh  defaults.sh                      lib.sh                           version.txt
root@OpenWrt-1:~/cake-autorate# cat version.txt
version = 2.0.0
commit = 67c5c55901614c79f70854e9b419992ad60d9a23
lynxthecat commented 1 year ago

Seems there is an issue with the migration:

root@OpenWrt-1:~/cake-autorate# rm cake-autorate* config.primary.sh defaults.sh launcher.sh lib.sh version.txt
root@OpenWrt-1:~/cake-autorate# ls
setup.sh
root@OpenWrt-1:~/cake-autorate# cp /tmp/config.primary.sh .
root@OpenWrt-1:~/cake-autorate# ls
config.primary.sh  setup.sh
root@OpenWrt-1:~/cake-autorate# mv config.primary.sh cake-autorate_config.primary.sh
root@OpenWrt-1:~/cake-autorate# ./setup.sh
Installing cake-autorate in /root/cake-autorate...
sh: cake-autorate_config.primary.sh: unknown operand
mv: can't rename '/tmp/tmp.PnLeFa/config.primary.sh': No such file or directory
rany2 commented 1 year ago

@lynxthecat test -a is not supported by busybox's sh, that's why

rany2 commented 1 year ago

Seems fixed now

lynxthecat commented 1 year ago

Yep - works. And now:


root@OpenWrt-1:~/cake-autorate# ./cake-autorate.sh
ERROR; 2023-06-30-17:36:58; 1688143018.955525; Instance identifier 'X' set by config.X.sh cannot be empty. Exiting now.
DEBUG; 2023-06-30-17:36:58; 1688143018.962239; Starting: cleanup_and_killall with PID: 9536
INFO; 2023-06-30-17:36:58; 1688143018.964821; Stopping cake-autorate with PID: 9536 and config: /root/cake-autorate/config.primary.sh
INFO; 2023-06-30-17:36:58; 1688143018.966828; Killing all background processes and cleaning up temporary files.
./cake-autorate.sh: line 91: proc_pids[intercept_stderr]: unbound variable
rany2 commented 1 year ago

now?

lynxthecat commented 1 year ago

Orthogonal issue here:

root@OpenWrt-1:~/cake-autorate# ls
cake-autorate.sh       config.primary.sh.new  launcher.sh            setup.sh
config.primary.sh      defaults.sh            lib.sh                 version.txt
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.OIdhBK/config.primary.sh': No such file or directory
rany2 commented 1 year ago

@lynxthecat Can't reproduce it

lynxthecat commented 1 year ago

Seems to work now!

rany2 commented 1 year ago

Orthogonal issue here:

root@OpenWrt-1:~/cake-autorate# ls
cake-autorate.sh       config.primary.sh.new  launcher.sh            setup.sh
config.primary.sh      defaults.sh            lib.sh                 version.txt
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.OIdhBK/config.primary.sh': No such file or directory

I could reproduce that when using your repository, I think you forgot to replace lynxthecat with rany2

lynxthecat commented 1 year ago

Wait... the setup.sh replaces the existing setup.sh in the directory?

rany2 commented 1 year ago

@lynxthecat yes, and the version in my repo is using lynxthecat; you need to manually modify it to rany2

lynxthecat commented 1 year ago

No I mean when you run setup.sh, it replaces the setup.sh with the setup.sh from repo?

rany2 commented 1 year ago

Yes assuming you are using a setup.sh in /root/cake-autorate

lynxthecat commented 1 year ago

OK yes I see. I think we're good now!

rany2 commented 1 year ago

Orthogonal issue here:

root@OpenWrt-1:~/cake-autorate# ls
cake-autorate.sh       config.primary.sh.new  launcher.sh            setup.sh
config.primary.sh      defaults.sh            lib.sh                 version.txt
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.OIdhBK/config.primary.sh': No such file or directory

Can't reproduce:

# ls /root/cake-autorate/
cake-autorate.sh   config.primary.sh  defaults.sh        launcher.sh        lib.sh             setup.sh           version.txt
# for x in cake-autorate.sh config.primary.sh launcher.sh lib.sh version.txt; do rm /root/cake-autorate/$x; done  
# ls /root/cake-autorate/
defaults.sh  setup.sh
# sh /tmp/test
Installing cake-autorate in /root/cake-autorate...

Now edit the config.primary.sh file as described in:
   https://github.com/rany2/CAKE-autorate#installation-on-openwrt

2.0.0 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

# 
lynxthecat commented 1 year ago

I think it's fine. I just didn't realise when I run setup.sh and then say try with different config, the previous run wrote over the old setup.sh so I forgot to rename from lynxthecat to rany2 again.

So all is good I think: https://www.youtube.com/watch?v=2FwPwqrB2JE.

lynxthecat commented 1 year ago

Would you suggest a straight merge or squash to single commit?

rany2 commented 1 year ago

straight merge is better IMO so we don't have one big commit to look back to in case something went wrong in the future

lynxthecat commented 1 year ago

Perhaps I can thank you on IRC?