mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
system reboot
This commit is contained in:
parent
f6150910a2
commit
465e8bfa18
6 changed files with 157 additions and 8 deletions
39
bin/v-restart-system
Executable file
39
bin/v-restart-system
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue