#!/bin/sh # use gainroot to become root and relaunch itself if [ `id -u` != 0 ] ; then #if not already root, call itself as root sudo gainroot <<EOF $0 $* EOF exit fi