X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=clients%2FHP%2Fbin%2Frestart_system;fp=clients%2FHP%2Fbin%2Frestart_system;h=855c7fc05d6927a7e0938cfd6739186af32cde14;hb=a8c84d2892f07a6863b68a11eb0a4a79ffd71fb5;hp=0000000000000000000000000000000000000000;hpb=95384f94f88aceeb5eef2d322210ba4a438b6512;p=clearscm.git diff --git a/clients/HP/bin/restart_system b/clients/HP/bin/restart_system new file mode 100644 index 0000000..855c7fc --- /dev/null +++ b/clients/HP/bin/restart_system @@ -0,0 +1,45 @@ +#!/bin/ksh +################################################################################ +# +# File: restart_system +# Description: A script to restart a system. Used for at jobs mainly. +# Author: Andrew@DeFaria.com +# Created: Wed Apr 16 14:14:17 PDT 1997 +# Modified: +# Language: Korn Shell +# +# (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved +# +################################################################################ +# Set me to command name +me=$(basename $0) + +# Set adm_base +adm_base=${adm_base:-$HOME/adm} + +# Set adm_fpath +adm_fpath=${adm_fpath:-$adm_base/functions} + +# Source functions +. $adm_fpath/common + +# Who do notify about the restart +notify=${notify:-$LOGNAME} + +if is_not_root; then + error "This script must be run as root" 1 +fi + +message="Restarting $(hostname) ($(uname -s)) via $me" +info $message +#mailx -s "$message" $notify <