Skip to content

Instantly share code, notes, and snippets.

@Frolki1-Dev
Created May 12, 2020 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frolki1-Dev/a0a580502c4c793bc9c02b44a22401dd to your computer and use it in GitHub Desktop.
Save Frolki1-Dev/a0a580502c4c793bc9c02b44a22401dd to your computer and use it in GitHub Desktop.
[Homestead] My after.sh script
#!/bin/sh
POLICY_FILE=/etc/ImageMagick-6/policy.xml.bak
# If you would like to do some extra provisioning you may
# add any commands you wish to this file and they will
# be run after the Homestead machine is provisioned.
#
# If you have user-specific configurations you would like
# to apply, you may also create user-customizations.sh,
# which will be run after this script.
# If you're not quite ready for Node 12.x
# Uncomment these lines to roll back to
# v11.x or v10.x
# Remove Node.js v12.x:
#sudo apt-get -y purge nodejs
#sudo rm -rf /usr/lib/node_modules/npm/lib
#sudo rm -rf //etc/apt/sources.list.d/nodesource.list
# Install Node.js v11.x
#curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
#sudo apt-get install -y nodejs
# Install Node.js v10.x
#curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
#sudo apt-get install -y nodejs
# Install the nfs
sudo apt-get install nfs-common portmap
# Install ZBar-Tools
sudo apt-get install zbar-tools
# Edit policy
if [ ! -f $POLICY_FILE ]
then
cp /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak
sed -i "s/rights\=\"none\" pattern\=\"PS\"/rights\=\"read\|write\" pattern\=\"PS\"/" /etc/ImageMagick-6/policy.xml
sed -i "s/rights\=\"none\" pattern\=\"EPI\"/rights\=\"read\|write\" pattern\=\"EPI\"/" /etc/ImageMagick-6/policy.xml
sed -i "s/rights\=\"none\" pattern\=\"PDF\"/rights\=\"read\|write\" pattern\=\"PDF\"/" /etc/ImageMagick-6/policy.xml
sed -i "s/rights\=\"none\" pattern\=\"XPS\"/rights\=\"read\|write\" pattern\=\"XPS\"/" /etc/ImageMagick-6/policy.xml
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment