Last active
February 2, 2024 07:12
-
-
Save lucasfernandodev/97e82ebe6990f8271f5f122ea29aaee0 to your computer and use it in GitHub Desktop.
Script for starting sshfs in background for coding using code-serve
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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