Last active
October 10, 2018 22:45
-
-
Save NotAwful/729387cc0ce8e2fd82d13ef074d8dcdb to your computer and use it in GitHub Desktop.
Move files to known web-facing folder on a digitalocean ghost droplet and changes permissions to make the file accessible
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 | |
if [ ! -d "/var/www/ghost/content/images/other" ]; then | |
echo "creating /var/www/ghost/content/images/other" | |
sudo mkdir /var/www/ghost/content/images/other | |
sudo chown ghost:ghost /var/www/ghost/content/images/other | |
sudo chmod 755 /var/www/ghost/content/images/other | |
fi | |
echo "moving $1 to /var/www/ghost/content/images/other/$1" | |
sudo mv $1 /var/www/ghost/content/images/other/$1 | |
sudo chown ghost:ghost /var/www/ghost/content/images/other/$1 | |
sudo chmod 644 /var/www/ghost/content/images/other/$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment