mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Move kill package_check to lxc_force_stop
This commit is contained in:
parent
85f99ecdf7
commit
eba30867c4
3 changed files with 12 additions and 2 deletions
|
@ -193,7 +193,8 @@ then
|
|||
fi
|
||||
fi
|
||||
# Create the lock file
|
||||
echo "start:$(date +%s)" > "$lock_file"
|
||||
# $$ is the PID of package_check itself.
|
||||
echo "start:$(date +%s):$$" > "$lock_file"
|
||||
|
||||
#=================================================
|
||||
# Check the internet connectivity
|
||||
|
|
|
@ -11,6 +11,12 @@ LXC_NAME=$(cat "$pcheck_config" | grep LXC_NAME= | cut -d '=' -f2)
|
|||
LXC_BRIDGE=$(cat "$pcheck_config" | grep LXC_BRIDGE= | cut -d '=' -f2)
|
||||
main_iface=$(cat "$pcheck_config" | grep iface= | cut -d '=' -f2)
|
||||
|
||||
echo "> Arrêt de package_check"
|
||||
# Kill package_check
|
||||
# Retrieve the pid of Package check
|
||||
package_check_pid="$(cat "$script_dir/../pcheck.lock" | cut -d: -f3)"
|
||||
sudo kill --signal 15 $package_check_pid
|
||||
|
||||
echo "> Arrêt du conteneur"
|
||||
if [ $(sudo lxc-info --name $LXC_NAME | grep -c "STOPPED") -eq 0 ]; then
|
||||
echo "Arrêt du conteneur $LXC_NAME"
|
||||
|
@ -39,3 +45,5 @@ then
|
|||
fi
|
||||
|
||||
sudo lxc-ls -f
|
||||
|
||||
sudo rm "$script_dir/../pcheck.lock"
|
||||
|
|
|
@ -1455,7 +1455,8 @@ TEST_LAUNCHER () {
|
|||
stop_timer 2
|
||||
|
||||
# Update the lock file with the date of the last finished test.
|
||||
echo "$1 $2:$(date +%s)" > "$lock_file"
|
||||
# $$ is the PID of package_check itself.
|
||||
echo "$1 $2:$(date +%s):$$" > "$lock_file"
|
||||
}
|
||||
|
||||
set_witness_files () {
|
||||
|
|
Loading…
Add table
Reference in a new issue