This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "${1}" ]; then | |
echo "please use it as 'compress-pdf <filename>'" | |
else | |
FILE=$1 | |
NEW_FILE=${FILE}.new.pdf | |
echo compressing $FILE | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${NEW_FILE}" "${FILE}" | |
ORIG_SIZE=$(ls "$FILE" -s | cut -d " " -f 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -p "Enter your ip: " IP | |
read -p "Enter your hostname: (myserver) " HOSTNAME | |
read -p "Enter your domainname: (domain.com) " DOMAIN | |
FQDN=$HOSTNAME.$DOMAIN | |
# Update the system | |
apt-get update | |
apt-get upgrade -y |