Skip to content

Instantly share code, notes, and snippets.

@rajubudde
rajubudde / mountnfs.sh
Created December 8, 2019 14:23 — forked from ondrejh/mountnfs.sh
Bash script: Wakeup and mount NFS server.
#!/bin/bash
#
# This script should do:
#
# 1) test if nfs folder is mounted and exit 0 if yes
# 2) try to mount it and exit 0 if success
# 3) try to wake the server if not possible to mount
# 4) wait while its not woked (pinging)
# 5) try againt 2-4 several times
@rajubudde
rajubudde / detect-os.sh
Created December 6, 2019 14:44 — forked from prabirshrestha/detect-os.sh
detect os in bash
#!/bin/sh
UNAME=$(uname)
if [ "$UNAME" == "Linux" ] ; then
echo "Linux"
elif [ "$UNAME" == "Darwin" ] ; then
echo "Darwin"
elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* ]] ; then