mirror of
https://github.com/myvesta/vesta.git
synced 2024-11-03 04:00:20 -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
|