echo "Copied files and installed packages."
}
-create_build_path()
+create_and_populate_build_path()
{
echo "Creating and populating the container build directory."
echo "Created and populated the container build directory."
}
+create_base_paths()
+{
+ echo "Creating container base directories."
+
+ [ ! -d $BACKUPS_PATH ] && mkdir --parents $BACKUPS_PATH
+ [ ! -d $BUILD_PATH ] && mkdir --parents $BUILD_PATH
+ [ ! -d $LXC_PATH ] && mkdir --parents $LXC_PATH
+
+ echo "Created container base directories."
+}
+
create_environment_file()
{
ENV_FILE=$(mktemp)
echo "Starting at $(date)"
+create_base_paths
+
create_environment_file
-create_build_path
+create_and_populate_build_path
populate_c3d
"RUNNING")
echo "Stopping (the old) container $OLD_CONTAINER_NAME"
lxc-stop --name=$OLD_CONTAINER_NAME
- echo "Stopped (the old) container $OLD_CONTAINER_NAME"
+ echo "Stopped (the old) container $OLD_CONTAINER_NAME"
;;
"STOPPED")
;;