Created
May 12, 2020 13:18
-
-
Save Frolki1-Dev/a0a580502c4c793bc9c02b44a22401dd to your computer and use it in GitHub Desktop.
[Homestead] My after.sh script
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/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