Commit 8b8c8990 authored by Robert Saß's avatar Robert Saß

Update merge-vhost-backups.sh

parent 0fa6f0ca
......@@ -10,8 +10,13 @@ read BACKUP_VHOST_DIR
echo "Name des neuen vhost auf dem lokalen System: "
read TARGET_VHOST_DIR
sudo cp "$BACKUP_DIR/$BACKUP_VHOST_DIR/public_html/*" "$TARGET_DIR/$TARGET_VHOST_DIR/public_html/"
sudo mv "$TARGET_DIR/$TARGET_VHOST_DIR/public_html" "$TARGET_DIR/$TARGET_VHOST_DIR/public_html~"
sudo mkdir "$TARGET_DIR/$TARGET_VHOST_DIR/public_html"
sudo chmod 0750 "$TARGET_DIR/$TARGET_VHOST_DIR/public_html"
sudo chown "$TARGET_VHOST_DIR":"$TARGET_VHOST_DIR" "$TARGET_DIR/$TARGET_VHOST_DIR/public_html/"
sudo cp -Rbav "$BACKUP_DIR/$BACKUP_VHOST_DIR/public_html/"* "$TARGET_DIR/$TARGET_VHOST_DIR/public_html/"
sudo chown -Rfcv "$TARGET_VHOST_DIR":"$TARGET_VHOST_DIR" "$TARGET_DIR/$TARGET_VHOST_DIR/public_html/"*
echo "Fertig."
echo "Inhalte hier auf dem lokalen System: ls $TARGET_DIR/$TARGET_VHOST_DIR/public_html/"
ls -al "$TARGET_DIR/$TARGET_VHOST_DIR/public_html/"
\ No newline at end of file
ls -al "$TARGET_DIR/$TARGET_VHOST_DIR/public_html/"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment