Drop grml-postfix
[grml-scripts.git] / usr_sbin / suspenduser_gui.sh
1 #!/bin/sh
2 # Filename:      suspenduser_gui.sh
3 # Purpose:       dialog interface for suspend user
4 # Authors:       grml-team (grml.org), (c) Nico Golde <nico@grml.org>, (c) Michael Prokop <mika@grml.org>
5 # License:       This file is licensed under the GPL v2.
6 ################################################################################
7
8 PATH=${PATH:-'/usr/bin:/usr/sbin'}
9
10 if [ "$(whoami)" != "root" ] ; then
11   echo "Error. You must be 'root' to run this command." >&2
12   exit 1
13 fi
14
15 dialog --stdout --title "Suspend User" --msgbox "Welcome to Suspend User
16
17 This script allows you to suspend a user from your system for
18 an indefinite time." 8 65
19
20 GETUSER=$(dialog --stdout --title "Suspend User" --inputbox "User to suspend:" 0 40) || exit 0
21 SUSPENDUSER=${GETUSER%/*}
22 suspenduser.sh $SUSPENDUSER
23
24 ## END OF FILE #################################################################