LVM fdisk

fdisk -lfdisk /dev/sdbroot@Mega:~# fdisk /dev/sdbCommand (m for help): nCommand action   e   extended   p   primary partition (1-4)pPartition number (1-4): 1First cylinder (1-2610, default 1): “enter”Using default value 1Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): “enter”Using default value 2610Command (m for help): tSelected partition 1Hex code (type L to list codes): 8eChanged system type […]

Sample script for updating current IP in dd-wrt, open-wrt and other linux based OS

Sample Script (Cloudflare) #!/bin/bashGET_LATEST_IP=”curl”LATEST_IP=`$GET_LATEST_IP`#echo $LATEST_IPCLOUDFLARE=”curl -X PUT \”\” -H \”X-Auth-Email: AUTH-EMAIL-ADDRESS\” -H \”X-Auth-Key: AUTH-KEY\” -H \”Content-Type: application/json\” –data ‘{\”type\”:\”A\”,\”name\”:\”DOMAIN-NAME\”,\”content\”:\”$LATEST_IP\”,\”ttl\”:1,\”proxied\”:false}'”RESPONSE=`$CLOUDFLARE`#echo $RESPONSE Sample ID format:ZONE-ID: xxx517f1e30dbxxxc1f8be73xxx6ab2aDNS-RECORD-ID: xxxd3db8axxx026xxx95876a77703fe1AUTH-EMAIL-ADDRESS: name@email.comAUTH-KEY: xxxa30184b74axxx8b3e67xxx5d426fe7xx16DOMAIN-NAME: Get Latest IP curl > /root/ip Get ZoneID curl -X GET “” \-H “X-Auth-Email: AUTH-EMAIL-ADDRESS” \-H “X-Auth-Key: AUTH-KEY´╗┐” \-H “Content-Type: application/json” List DNS Records curl […]