onionr/start-ram.sh

17 lines
708 B
Bash
Raw Normal View History

2020-03-23 02:54:20 +00:00
#!/bin/sh
if [ -d "/dev/shm" ]
then
echo "Using /dev/shm to make a RAM based Onionr instance."
else
echo "This system does not have /dev/shm. Cannot use this script."
exit 9;
fi
2020-03-24 08:17:40 +00:00
ONIONR_HOME="$(mktemp -p /dev/shm/ -d -t onionr-XXXXXXXXXXX)"
2020-03-23 02:54:20 +00:00
export ONIONR_HOME
echo "Onionr has been launched with a temporary home directory using /dev/shm. Note that the OS may still write to swap if applicable."
echo "Future Onionr commands will use your set or default Onionr home directory, unless you set it to $ONIONR_HOME"
echo "Ultimately, a live boot operating system such as Tails or Debian would be better for you to use."
$(dirname $0)/onionr.sh start & disown
sleep 2
2020-03-24 08:17:40 +00:00
$(dirname $0)/onionr.sh open-home