Commit c164337f authored by Jondy Zhao's avatar Jondy Zhao

Exit in 1 minute when configure scripts run successfully

Add cron job in the slapos configure
parent 0d8e02ff
...@@ -100,6 +100,6 @@ for x in $(cygrunsrv --list) ; do ...@@ -100,6 +100,6 @@ for x in $(cygrunsrv --list) ; do
done done
echo Run post-install script successfully. echo Run post-install script successfully.
read -n 1 -p "Press any key to exit..." read -n 1 -t 60 -p "Press any key to exit..."
exit 0 exit 0
...@@ -31,6 +31,6 @@ for x in $(cygrunsrv --list) ; do ...@@ -31,6 +31,6 @@ for x in $(cygrunsrv --list) ; do
done done
echo Run pre-uninstall script successfully. echo Run pre-uninstall script successfully.
read -n 1 -p "Press any key to exit..." read -n 1 -t 60 -p "Press any key to exit..."
exit 0 exit 0
...@@ -187,16 +187,17 @@ else ...@@ -187,16 +187,17 @@ else
echo The syslog-ng service has been installed. echo The syslog-ng service has been installed.
fi fi
# echo Checking cron service ... echo Checking cron job ...
# cygrunsrv --query cron > /dev/null ps -ef | grep -q "/usr/sbin/cron"
# if (( $? )) ; then if (( $? )) ; then
# echo Run cron-config ... echo Starting cron job ...
# /usr/bin/cron-config --yes || \ /usr/sbin/cron &
# show_error_exit "Failed to run cron-config" (( $? )) && show_error_exit "Failed to run cron-config"
# echo OK. disown -h
# else echo The cron job started.
# echo The cron service has been installed. else
# fi echo The cron job is running.
fi
#------------------------------------------------- #-------------------------------------------------
# Configure slapos network # Configure slapos network
...@@ -435,9 +436,9 @@ echo ...@@ -435,9 +436,9 @@ echo
# here. Get re6stnet client count, then remove extra drivers and add # here. Get re6stnet client count, then remove extra drivers and add
# required drivers. # required drivers.
# #
echo echo
echo Installing OpenVPN Tap-Windows Driver ... echo Installing OpenVPN Tap-Windows Driver ...
echo echo
original_connections=$(echo $(get_all_connections)) original_connections=$(echo $(get_all_connections))
client_count=$(sed -n -e "s/^client-count *//p" /etc/re6stnet/re6stnet.conf) client_count=$(sed -n -e "s/^client-count *//p" /etc/re6stnet/re6stnet.conf)
[[ -z $client_count ]] && client_count=10 [[ -z $client_count ]] && client_count=10
...@@ -458,7 +459,7 @@ for re6stnet_ifname in $re6stnet_name_list ; do ...@@ -458,7 +459,7 @@ for re6stnet_ifname in $re6stnet_name_list ; do
done done
# #
# Remove OpenVPN Tap-Windows Driver # Remove OpenVPN Tap-Windows Driver
# #
# ip vpntap del dev re6stnet-x # ip vpntap del dev re6stnet-x
# #
...@@ -483,7 +484,7 @@ if (( $? )) ; then ...@@ -483,7 +484,7 @@ if (( $? )) ; then
/opt/slapos/bin/slapos node format -cv --now || /opt/slapos/bin/slapos node format -cv --now ||
show_error_exit "Failed to run slapos format." show_error_exit "Failed to run slapos format."
echo echo
echo "Supply $slaprunner_cfg in the computer $computer_id" echo "Supply $slaprunner_cfg in the computer $computer_id"
/opt/slapos/bin/slapos supply $slaprunner_cfg $computer_id /opt/slapos/bin/slapos supply $slaprunner_cfg $computer_id
echo "Request an instance 'Node Runner' ..." echo "Request an instance 'Node Runner' ..."
...@@ -565,5 +566,5 @@ EOF ...@@ -565,5 +566,5 @@ EOF
fi fi
echo SlapOS Node configure successfully. echo SlapOS Node configure successfully.
read -n 1 -p "Press any key to exit..." read -n 1 -t 60 -p "Press any key to exit..."
exit 0 exit 0
...@@ -120,4 +120,5 @@ echo "Creating instance ..." ...@@ -120,4 +120,5 @@ echo "Creating instance ..."
echo "Sending report ..." echo "Sending report ..."
/opt/slapos/bin/slapos node report --verbose /opt/slapos/bin/slapos node report --verbose
read -n 1 -t 60 -p "Press any key to exit..."
exit 0 exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment