mirror of
https://github.com/Retropex/apolloapi-v2.git
synced 2025-05-14 20:20:49 +02:00
15 lines
241 B
Bash
Executable File
15 lines
241 B
Bash
Executable File
#!/bin/bash
|
|
DEVICE=/dev/nvme0n1p1
|
|
SWAPFILE=/media/nvme/swapfile
|
|
|
|
if [ -b "$DEVICE" ]; then
|
|
if [ ! -f "$SWAPFILE" ]; then
|
|
fallocate -l 3G $SWAPFILE
|
|
chmod 600 $SWAPFILE
|
|
mkswap $SWAPFILE
|
|
fi
|
|
swapon /media/nvme/swapfile
|
|
else
|
|
exit 0
|
|
fi
|