#!/bin/sh # Source shlib _root="$(dirname "${0}")"; . "${_root}/lib/sh/env.sh" want log ask reexec id note This is a note. log ...and a log... warn ...warning... log "Are you sure?" yn || err you said no if [ "$(id -u)" -ne 0 ] then note "Restart script as root" reexec "${0}" "${@}" fi err the end