Should work on Amazon Linux as well
needs-restarting -r ; echo $?
needs-restarting -r || shutdown -r
#!/bin/bash
| #!/bin/bash | |
| # keep only audio track 1 | |
| # keep no subtitle tracks | |
| # or use -map 0:m:language:eng | |
| LOGLEVEL='warn' | |
| OPTS='-hide_banner -loglevel ${LOGLEVEL}' | |
| for x in *.mkv ; do | |
| echo ${x} | |
| ffmpeg ${OPTS} -i "${x}" -map 0:v -map 0:a:0 -map -0:s -c copy "new-${x}" |
| " Basic init | |
| scriptencoding utf-8 | |
| set background=dark | |
| if version > 580 | |
| hi clear | |
| if exists("syntax_on") | |
| syntax reset | |
| endif | |
| endif | |
| syntax enable |
| #!/bin/bash | |
| # This will add cover art to all *.m4a in a directory without transcoding the input file | |
| # jpeg or png only | |
| # requires AtomicParsley 'sudo apt install AtomicParsley' | |
| # run in your working directory | |
| # JPEGs will be converted into PNGs | |
| SECONDS='0' | |
| COVER=${1} | |
| CMD='AtomicParsley' |
| #!/bin/bash | |
| # add cover art image to flac audio files, requires metaflac | |
| # run from working directory | |
| SECONDS=0 | |
| COVER=${1} | |
| COUNT=$(ls *.flac | wc -l) | |
| COUNTER='1' | |
| CMD='metaflac' | |
| NC='\e[0m' |
| #!/bin/bash | |
| # list the temperatures of all sd devices and convert it to Fahrenheit | |
| # Will get temp for USB devices as well | |
| for i in /dev/sd? ; do | |
| temp=$(smartctl --all ${i} | grep "^194" | awk '{ print $10 }' | awk -v RS=" " '{printf("%.1f ",$1*1.8+32)}') | |
| echo ${i} ${temp} deg F | |
| done | |
| exit 0 |
| #!/bin/bash | |
| #URL="https://www.splunk.com/en_us/download/splunk-enterprise.html" | |
| URL="https://www.splunk.com/en_us/download/universal-forwarder.html" | |
| OS_REGEX="linux-2\.6-x86_64\.rpm" | |
| #OS_REGEX="Linux-x86_64\.md5" | |
| RESPONSE=`curl -s --connect-timeout 10 --max-time 10 $URL` | |
| LINK=`echo $RESPONSE | egrep -o "data-link=\"https://[^\"]+-${OS_REGEX}\"" | cut -c12- | rev | cut -c2- | rev` |
| #!/bin/bash | |
| # This will add cover art to all *.mp3 in a directory without transcoding the input file | |
| # requires ffmpeg | |
| # JPEGs will be converted into PNGs | |
| SECONDS=0 | |
| COVER=${1} | |
| CMD='ffmpeg' | |
| COUNT=$(ls *.mp3 | wc -l) | |
| COUNTER='1' |
| #!/bin/bash | |
| SECONDS=0 | |
| RED='\033[0;31m' | |
| WHITE='\033[1;37m' | |
| CYAN='\033[0;36m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' # No Color | |
| LIST='host1 host2 host3' |
| sudo su | |
| yum --enablerepo=extras install epel-release | |
| yum -y install patch dkms kernel-devel perl | |
| yum update | |
| reboot | |
| sudo su |