2013-01-19 23:07:26 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# info: start service
|
|
|
|
# options: service
|
|
|
|
#
|
|
|
|
# The function starts system service.
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Variable&Function #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
2015-11-06 17:38:58 +02:00
|
|
|
# Argument definition
|
2013-01-19 23:07:26 +02:00
|
|
|
service=$1
|
|
|
|
|
|
|
|
# Includes
|
|
|
|
source $VESTA/func/main.sh
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Verifications #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
check_args '1' "$#" 'SERVICE'
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Action #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
2014-10-23 17:07:08 +03:00
|
|
|
if [ "$service" != 'iptables' ]; then
|
|
|
|
service $service start >/dev/null 2>&1
|
2015-10-28 16:34:41 +02:00
|
|
|
check_result $? "$service start failed" $E_RESTART
|
2014-10-23 17:07:08 +03:00
|
|
|
else
|
|
|
|
$BIN/v-update-firewall
|
2015-10-28 16:34:41 +02:00
|
|
|
check_result $? "$service start failed" $E_RESTART
|
2013-01-19 23:07:26 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Vesta #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
exit
|