#!/bin/bash

# Alias: Use a ramdisk for temporary files
# Menu: Basic
#  This settings decides, wether this site uses a ramdisk for
#  temporary files. Using a ramdisk reduces disk IO produced
#  during monitoring dramatically. It is highly recommended to
#  leave this option enabled. Only disable this if you really
#  need to.

case "$1" in
    default)
        echo "on"
    ;;
    choices)
        echo "on: Use a ramdisk for temporary files"
        echo "off: Do not use a ramdisk within this site"
    ;;
    set)
        # Unmount the tmpfs when it was mounted before
        if [ "$2" == "off" ]; then
            omd umount
        fi
    ;;
esac
