myvesta/bin/v-restart-system
2015-11-06 17:38:58 +02:00

40 lines
1012 B
Bash
Executable File

#!/bin/bash
# info: restart operating system
# options: restart
#
# The function restarts operating system.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument definition
restart=$1
# Includes
source $VESTA/func/main.sh
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
check_args '1' "$#" 'RESTART'
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
if [ "$restart" = 'yes' ]; then
/sbin/reboot
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit