mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 14:56:41 +00:00
15 lines
538 B
Bash
Executable File
15 lines
538 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to deploy on an instance that has an ephemeral volume as /dev/nvme0n1 (adjust env var PARTITION if different)
|
|
# Ensures the partition is xfs-formatted, any existing partition contents will be overwritten if formatted otherwise.
|
|
# An existing xfs partition will be left alone.
|
|
PARTITION=/dev/nvme0n1
|
|
FSTYPE=$(blkid -p $PARTITION -s TYPE -o value)
|
|
if [ "$FSTYPE" = "" ]; then
|
|
echo FSTYPE was empty, creating swap partition
|
|
mkswap $PARTITION
|
|
swapon -a $PARTITION
|
|
else
|
|
echo FSTYPE was "$FSTYPE", not touching
|
|
fi
|