Closed rany2 closed 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.
@lynxthecat Could you test this for me, just change the repo in setup.sh to rany2 and it should work
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
@lynxthecat try now
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
@lynxthecat are you sure you're testing the latest one with my repo?
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
@lynxthecat works OK in my VM, maybe you didn't replace all instances of lynxthecat with rany2 in your setup.sh?
Doh, yes.
also doesn't seem like you're using my setup.sh file, i think
I think I am. I just didn't rename. Does half a glass of wine justify this to some small extent?
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
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
@lynxthecat test -a
is not supported by busybox's sh, that's why
Seems fixed now
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
now?
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
@lynxthecat Can't reproduce it
Seems to work now!
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
Wait... the setup.sh replaces the existing setup.sh in the directory?
@lynxthecat yes, and the version in my repo is using lynxthecat
; you need to manually modify it to rany2
No I mean when you run setup.sh, it replaces the setup.sh with the setup.sh from repo?
Yes assuming you are using a setup.sh in /root/cake-autorate
OK yes I see. I think we're good now!
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
#
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.
Would you suggest a straight merge or squash to single commit?
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
Perhaps I can thank you on IRC?
setup.sh
documentation