ao-mud is a spellbook of well-commented atomic bash scripts that each do one thing. we are building semantic building blocks for an autonomously-evolving digital spellcasting language.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
714 B

#!/bin/sh
# POSIX-compliant script for mounting a remote directory using sshfs over Tor
# Check for required commands
if ! command -v torify &> /dev/null; then
echo "Error: torify command not found. Please install tor and try again."
exit 1
fi
# Get player key
if [ -z "$MUD_PLAYER" ]; then
echo "Error: MUD_PLAYER environment variable not set."
exit 1
fi
# Prompt user for tor address and remote directory
echo "Enter the tor address:"
read tor_address
echo "Enter the remote directory:"
read remote_dir
# Strip or add trailing slashes as required
remote_dir="${remote_dir%/}/"
# Connect to remote directory via ssh through torify
torify ssh -i ~/.ssh/$MUD_PLAYER "$tor_address:$remote_dir"