Wednesday, June 10, 2020

Cisco 3802 u-boot

printenv BOOT  <<< Check the current configuration
setenv BOOT <part1 part2="">  <<< Change to another partition
saveenv  <<< Save configuration
boot  <<< Reload the AP</part1>

setenv bootcmd nandboot  <<< Set to nandboot
saveenv  <<< Save configuration
boot  <<< Reload the AP
setenv bootcmd nandboot  <<< Set to nandboot
saveenv  <<< Save configuration
boot  <<< Reload the AP
printenv BOOT  <<< Check the current configuration
setenv BOOT <part1 part2="">  <<< Change to another partition
saveenv  <<< Save configuration
boot  <<< Reload the AP</part1>

Saturday, February 29, 2020

Automated Renewal of LetsEncrypt Cert on Cisco IOS with Route53

Installed the AWS CLI
apt-get install python3-pip
Ubunutu 16.x needs this as there is a bug in the package above
pip3 install awscli --upgrade 
I used this script as the base for the AWS Route 53 Zone update and Certificate request

Create a public key for the "automation" user:

root@control:/usr/local/scripts# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): /usr/local/scripts/cisco-automation.key
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /usr/local/scripts/cisco-automation.key.
Your public key has been saved in /usr/local/scripts/
The key fingerprint is:
The key's randomart image is:
Add the public key to the router:
ip ssh pubkey-chain
username automation
(paste in your pub key max 254 characters per line, so you will need to split it)
copy the keys into the id_rsa and file of the user that will run the script
cat cisco-automation.key > /root/.ssh/id_rsacat > /root/.ssh/ 


Ubuntu 18.04 LTS

EmonScripts/ at master · openenergymonitor/EmonScripts · GitHub

echo $USER' ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/$USER && sudo chmod 0440 /etc/sudoers.d/$USER

chmod +x && ./

settings.ini in /var/www/emoncms/.

cd /opt/openenergymonitor/EmonScripts/install/
nano config.ini

Standard Setup Filepaths

Install location for code from OpenEnergyMonitor GitHub repository such as EmonScripts /opt/openenergymonitor
Install location for modules symlinked to www /opt/emoncms
Main code location /var/www/emoncms
Log file location /var/log/emoncms
Data directory /var/opt/emoncms