Created
February 7, 2014 21:11
-
-
Save vsoch/8871917 to your computer and use it in GitHub Desktop.
Startup script for pseq-instance on GCE
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/bash | |
# Key off existence of the "data" mount point to determine whether | |
# this is the first boot. | |
if [[ ! -e /mnt/data ]]; then | |
# Basic setup - get the JRE installed | |
apt-get update | |
apt-get install --fix-broken | |
mkdir -p /mnt/data | |
fi | |
# Get the device name of the "data" disk | |
DISK_DEV=$(basename $(readlink /dev/disk/by-id/google-pseq)) | |
# Mount the data disk | |
/usr/share/google/safe_format_and_mount \ | |
-m "mkfs.ext4 -F" /dev/$DISK_DEV /mnt/data | |
chmod 777 /mnt/data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment