mirror of
https://github.com/serghey-rodin/vesta.git
synced 2024-12-03 19:00:24 -08:00
40 lines
1012 B
Bash
Executable File
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
|