system reboot

This commit is contained in:
Serghey Rodin 2013-10-23 14:01:43 +03:00
commit 465e8bfa18
6 changed files with 157 additions and 8 deletions

39
bin/v-restart-system Executable file
View file

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