scottslowe-learning-tools/photon/photon-cloudinit/setup.sh
Scott Lowe 43ab5524a2
Reorganize repository contents
Move contents into new folder structure based on primary technology

Signed-off-by: Scott Lowe <scott.lowe@scottlowe.org>
2017-02-23 16:12:37 -07:00

17 lines
554 B
Bash
Executable file

#!/bin/bash
# Make directory for NoCloud cloud-init datasource
if [ ! -d "/var/lib/cloud/seed/nocloud" ]; then
mkdir /var/lib/cloud/seed/nocloud
fi
# Put files into the correct locations for cloud-init
# First move the user-data file, if it exists in the home directory
if [ -f "/home/vagrant/user-data" ]; then
mv /home/vagrant/user-data /var/lib/cloud/seed/nocloud/
fi
# Next move the meta-data file, if it exists in the home directory
if [ -f "/home/vagrant/meta-data" ]; then
mv /home/vagrant/meta-data /var/lib/cloud/seed/nocloud/
fi