v2ray/swap/swap/scripts/swap_startup.sh
2019-01-13 21:09:19 +08:00

15 lines
369 B
Bash
Executable File

#! /bin/sh
# ====================================变量定义====================================
eval `dbus export swap`
usb_disk=`/bin/mount | grep -E 'mnt' | sed -n 1p | cut -d" " -f3`
sleep 2
if [ -f $usb_disk/swapfile ]
then
echo -e "Mounting swap file..."
swapon $usb_disk/swapswapfile
else
echo -e "Swap file not found or $usb_disk is not mounted..."
fi