mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Moar misc cleanup
This commit is contained in:
parent
e7f5e34a8b
commit
f66ee51338
3 changed files with 16 additions and 17 deletions
|
@ -578,17 +578,16 @@ TEST_RESULTS () {
|
||||||
# Print the result for each test
|
# Print the result for each test
|
||||||
echo -e "\n\n"
|
echo -e "\n\n"
|
||||||
print_result "Package linter" $RESULT_linter
|
print_result "Package linter" $RESULT_linter
|
||||||
print_result "Installation" $RESULT_global_setup
|
print_result "Install" $RESULT_global_setup
|
||||||
print_result "Deleting" $RESULT_global_remove
|
print_result "Remove" $RESULT_global_remove
|
||||||
print_result "Installation in a sub path" $RESULT_check_sub_dir
|
print_result "Install (subpath)" $RESULT_check_sub_dir
|
||||||
print_result "Deleting from a sub path" $RESULT_check_remove_sub_dir
|
print_result "Remove (subpath)" $RESULT_check_remove_sub_dir
|
||||||
print_result "Installation on the root" $RESULT_check_root
|
print_result "Install (root)" $RESULT_check_root
|
||||||
print_result "Deleting from root" $RESULT_check_remove_root
|
print_result "Remove (root)" $RESULT_check_remove_root
|
||||||
print_result "Upgrade" $RESULT_check_upgrade
|
print_result "Upgrade" $RESULT_check_upgrade
|
||||||
print_result "Installation in private mode" $RESULT_check_private
|
print_result "Install (private mode)" $RESULT_check_private
|
||||||
print_result "Installation in public mode" $RESULT_check_public
|
print_result "Install (public mode)" $RESULT_check_public
|
||||||
print_result "Multi-instance installations" $RESULT_check_multi_instance
|
print_result "Install (multi-instance)" $RESULT_check_multi_instance
|
||||||
print_result "Malformed path" $RESULT_check_path
|
|
||||||
print_result "Port already used" $RESULT_check_port
|
print_result "Port already used" $RESULT_check_port
|
||||||
print_result "Backup" $RESULT_check_backup
|
print_result "Backup" $RESULT_check_backup
|
||||||
print_result "Restore" $RESULT_check_restore
|
print_result "Restore" $RESULT_check_restore
|
||||||
|
|
|
@ -105,7 +105,7 @@ create_temp_backup () {
|
||||||
# Set this snapshot as the current snapshot
|
# Set this snapshot as the current snapshot
|
||||||
current_snapshot=snap$snap_number
|
current_snapshot=snap$snap_number
|
||||||
|
|
||||||
stop_timer 1 >&2
|
stop_timer 1 >> $complete_log
|
||||||
|
|
||||||
# Restart the container, after the snapshot
|
# Restart the container, after the snapshot
|
||||||
LXC_START "true" >&2
|
LXC_START "true" >&2
|
||||||
|
@ -188,7 +188,7 @@ LXC_START () {
|
||||||
local j=0
|
local j=0
|
||||||
for j in `seq 1 5`
|
for j in `seq 1 5`
|
||||||
do
|
do
|
||||||
echo -n .
|
echo -n . >> "$test_result"
|
||||||
# Try to connect with ssh to check if the container is ready to work.
|
# Try to connect with ssh to check if the container is ready to work.
|
||||||
if ssh $arg_ssh -o ConnectTimeout=10 $lxc_name "exit 0" > /dev/null 2>&1; then
|
if ssh $arg_ssh -o ConnectTimeout=10 $lxc_name "exit 0" > /dev/null 2>&1; then
|
||||||
# Break the for loop if the container is ready.
|
# Break the for loop if the container is ready.
|
||||||
|
|
|
@ -167,7 +167,7 @@ REMOVE_APP () {
|
||||||
# Make a break if auto_remove is set
|
# Make a break if auto_remove is set
|
||||||
break_before_continue
|
break_before_continue
|
||||||
|
|
||||||
ECHO_FORMAT "\nDeleting...\n" "white" "bold" clog
|
ECHO_FORMAT "\nRemoving the app...\n" "white" "bold" clog
|
||||||
|
|
||||||
# Remove the application from the LXC container
|
# Remove the application from the LXC container
|
||||||
LXC_START "sudo PACKAGE_CHECK_EXEC=1 yunohost --debug app remove \"$ynh_app_id\""
|
LXC_START "sudo PACKAGE_CHECK_EXEC=1 yunohost --debug app remove \"$ynh_app_id\""
|
||||||
|
@ -177,9 +177,9 @@ REMOVE_APP () {
|
||||||
|
|
||||||
# Print the result of the remove command
|
# Print the result of the remove command
|
||||||
if [ "$yunohost_remove" -eq 0 ]; then
|
if [ "$yunohost_remove" -eq 0 ]; then
|
||||||
ECHO_FORMAT "Deleting successful. ($yunohost_remove)\n" "white" clog
|
ECHO_FORMAT "Remove successful. ($yunohost_remove)\n" "white" clog
|
||||||
else
|
else
|
||||||
ECHO_FORMAT "Deleting failed. ($yunohost_remove)\n" "white" clog
|
ECHO_FORMAT "Remove failed. ($yunohost_remove)\n" "white" clog
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check all the witness files, to verify if them still here
|
# Check all the witness files, to verify if them still here
|
||||||
|
@ -620,7 +620,7 @@ CHECK_SETUP () {
|
||||||
# Check if a snapshot already exist for a root install
|
# Check if a snapshot already exist for a root install
|
||||||
if [ -z "$root_snapshot" ]
|
if [ -z "$root_snapshot" ]
|
||||||
then
|
then
|
||||||
ECHO_FORMAT "Create a snapshot for root installation.\n" "white" clog
|
ECHO_FORMAT "Create a snapshot for root installation.\n" "white" clog >> $complete_log
|
||||||
create_temp_backup 2
|
create_temp_backup 2
|
||||||
root_snapshot=snap2
|
root_snapshot=snap2
|
||||||
fi
|
fi
|
||||||
|
@ -629,7 +629,7 @@ CHECK_SETUP () {
|
||||||
if [ -z "$subpath_snapshot" ]
|
if [ -z "$subpath_snapshot" ]
|
||||||
then
|
then
|
||||||
# Then create a snapshot
|
# Then create a snapshot
|
||||||
ECHO_FORMAT "Create a snapshot for sub path installation.\n" "white" clog
|
ECHO_FORMAT "Create a snapshot for sub path installation.\n" "white" clog >> $complete_log
|
||||||
create_temp_backup 1
|
create_temp_backup 1
|
||||||
subpath_snapshot=snap1
|
subpath_snapshot=snap1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue