Skip to content

Instantly share code, notes, and snippets.

@lucasfernandodev
Last active February 2, 2024 07:12
Show Gist options
  • Save lucasfernandodev/97e82ebe6990f8271f5f122ea29aaee0 to your computer and use it in GitHub Desktop.
Save lucasfernandodev/97e82ebe6990f8271f5f122ea29aaee0 to your computer and use it in GitHub Desktop.
Script for starting sshfs in background for coding using code-serve
#!/data/data/com.termux/files/usr/bin/bash
#termux-wake-lock
SSH_CONFIG="~/.ssh/config";
LOG_OUTPUT=".sshfs-log.txt";
DEST_FOLDER="$PREFIX/var/www/.remote";
mr(){
mkdir -p $DEST_FOLDER
sudo -E nohup sshfs ${1} $DEST_FOLDER -v -F $SSH_CONFIG -o cache=yes,kernel_cache,Compression=no \
-o ServerAliveCountMax=3,ServerAliveInterval=15 -o idmap=user -o allow_other \
-o uid=10164,gid=10164 -o StrictHostKeychecking=no \
-o transform_symlinks -o follow_symlinks> $LOG_OUTPUT &
}
mr ${@}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment