Linux - load new kernel with kexec - faster than reboot

Published on Author admin

Load new Linux kernel with kexec - method faster than reboot. Just run below script using sudo or as a root. Script is also available at: https://github.com/openterprise/scripts/blob/master/kexec.sh #!/bin/bash latestkernel=`ls -t /boot/vmlinuz-* | sed "s/\/boot\/vmlinuz-//g" | head -n1` echo "kernel current: $(uname -r)" echo "kernel target:  ${latestkernel}" echo "" echo "Arming kexec..." #kexec -l /boot/vmlinuz-${latestkernel} --initrd=/boot/initramfs-${latestkernel}.img… Continue reading Linux - load new kernel with kexec - faster than reboot

Capturing network traffic to/from virtual machine running on VMware ESXi host

Published on Author admin

How to capture network traffic from/to virtual machine running on VMware ESXi host. This method uses pktcap-uw tool which is available in ESXi 5.5 and later. First enable SSH on your VMware ESXi host. Connect to ESXi host via SSH. List running virtual machines and check World-ID: esxcli network vm list Assuming that our VM… Continue reading Capturing network traffic to/from virtual machine running on VMware ESXi host

AWS S3 backup script

Published on Author admin

Start with updating AWS CLI tool: pip3 install awscli --upgrade --user Script for backing up data into your AWS S3 bucket: #!/bin/bash pathtobackup='/home/USERNAME/data/' pathtoarchivefile='/home/USERNAME' filenameprefix='backup-nextcloud' secret='secretpassword' awsbucket='awsbucket-name' date=`date --iso-8601` archivefilename=$filenameprefix-$date.7z echo echo "Performing backup of $pathtobackup to s3://$awsbucket/$archivefilename" echo echo `date -Is` echo "Compressing $pathtobackup to $pathtoarchivefile/$archivefilename" echo 7za a $pathtoarchivefile/$archivefilename $pathtobackup -p$secret echo echo… Continue reading AWS S3 backup script

[Raspberry Pi] script for auto reconnecting WiFi connection

Published on Author admin

Create script file: touch /home/volumio/wifi-reconnect.sh with following content: #!/bin/bash   SSID=$(/sbin/iwgetid --raw) if [ -z "$SSID" ] then     echo "`date -Is` WiFi interface is down, trying to reconnect" >> /home/volumio/wifi-log.txt     systemctl restart wireless fi echo "WiFi check finished" Make new file executable: chmod +x /home/volumio/wifi-reconnect.sh Install cron: sudo apt-get install cron… Continue reading [Raspberry Pi] script for auto reconnecting WiFi connection