1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lxd_ynh.git synced 2024-09-03 19:45:53 +02:00

remove "--time"

This commit is contained in:
Kay0u 2021-03-02 15:59:40 +01:00
parent e182cbc341
commit cb39602175
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
4 changed files with 37 additions and 37 deletions

View file

@ -29,28 +29,28 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_script_progression --message="Storing installation settings..." --time --weight=1
ynh_script_progression --message="Storing installation settings..."
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# OPEN A PORT
#=================================================
ynh_script_progression --message="Configuring firewall..." --time --weight=1
ynh_script_progression --message="Configuring firewall..."
ynh_exec_warn_less yunohost firewall allow --no-upnp Both 67
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --time --weight=1
ynh_script_progression --message="Installing dependencies..." --weight=30
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --time --weight=1
ynh_script_progression --message="Setting up source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src
go_tmp=$(mktemp -d)
@ -66,7 +66,7 @@ export GOPATH=${lxd_tmp}/_dist
#=================================================
# BUILD FROM SOURCES
#=================================================
ynh_script_progression --message="Building lxd from sources..." --time --weight=1
ynh_script_progression --message="Building lxd from sources..." --weight=60
pushd ${lxd_tmp}
@ -94,7 +94,7 @@ ynh_secure_remove --file="$lxd_tmp"
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --time --weight=1
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
@ -104,7 +104,7 @@ ynh_system_user_create --username=$app
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_socket_config
@ -133,14 +133,14 @@ echo "root:1000000:65536 # Added by lxd#" | tee -a /etc/subuid /etc/subgid
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports=67
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
@ -149,4 +149,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --time --last
ynh_script_progression --message="Installation of $app completed" --last

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1
ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
@ -25,14 +25,14 @@ app=$YNH_APP_INSTANCE_NAME
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
then
ynh_script_progression --message="Removing $app service integration..." --time --weight=1
ynh_script_progression --message="Removing $app service integration..."
yunohost service remove $app
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --time --weight=1
ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_socket_config
@ -41,7 +41,7 @@ ynh_exec_warn_less ynh_remove_systemd_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --time --weight=1
ynh_script_progression --message="Removing dependencies..." --weight=20
# Remove metapackage and its dependencies
ynh_exec_warn_less ynh_remove_app_dependencies
@ -52,7 +52,7 @@ ynh_exec_warn_less ynh_remove_app_dependencies
if yunohost firewall list | grep -q "\- 67$"
then
ynh_script_progression --message="Closing port 67..." --time --weight=1
ynh_script_progression --message="Closing port 67..."
ynh_exec_warn_less yunohost firewall disallow Both 67
fi
@ -84,7 +84,7 @@ sed -i "/root:1000000:65536 # Added by lxd#/d" /etc/sub{uid,gid}
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user..." --time --weight=1
ynh_script_progression --message="Removing the dedicated system user..."
# Delete a system user
ynh_system_user_delete --username=$app
@ -99,4 +99,4 @@ ynh_print_warn --message="If you really want to delete all containers and files
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --time --last
ynh_script_progression --message="Removal of $app completed" --last

View file

@ -24,7 +24,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1
ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --time --weight=1
ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
@ -41,7 +41,7 @@ ynh_system_user_create --username=$app
#=================================================
# OPEN A PORT
#=================================================
ynh_script_progression --message="Configuring firewall..." --time --weight=1
ynh_script_progression --message="Configuring firewall..."
ynh_exec_warn_less yunohost firewall allow --no-upnp Both 67
@ -50,7 +50,7 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp Both 67
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1
ynh_script_progression --message="Reinstalling dependencies..." --weight=30
# Define and install dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
@ -58,7 +58,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE SYSTEMD
#=================================================
ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1
ynh_script_progression --message="Restoring the systemd configuration..."
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
ynh_restore_file --origin_path="/etc/systemd/system/$app.socket"
@ -67,7 +67,7 @@ systemctl enable $app.service --quiet
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports=67
@ -97,7 +97,7 @@ echo "root:1000000:65536 # Added by lxd#" | tee -a /etc/subuid /etc/subgid
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
@ -105,4 +105,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --time --last
ynh_script_progression --message="Restoration completed for $app" --last

View file

@ -12,19 +12,19 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1
ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1
ynh_script_progression --message="Ensuring downward compatibility..."
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time --weight=1
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
# Backup the current version of the app
ynh_backup_before_upgrade
@ -42,21 +42,21 @@ ynh_abort_if_errors
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
ynh_script_progression --message="Upgrading dependencies..."
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --time --weight=1
ynh_script_progression --message="Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src
go_tmp=$(mktemp -d)
@ -72,7 +72,7 @@ export GOPATH=${lxd_tmp}/_dist
#=================================================
# BUILD FROM SOURCES
#=================================================
ynh_script_progression --message="Building lxd from sources..." --time --weight=1
ynh_script_progression --message="Building lxd from sources..." --weight=60
pushd ${lxd_tmp}
@ -100,7 +100,7 @@ ynh_secure_remove --file="$lxd_tmp"
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
@ -110,7 +110,7 @@ ynh_system_user_create --username=$app
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_socket_config
@ -143,14 +143,14 @@ echo "root:1000000:65536 # Added by lxd#" | tee -a /etc/subuid /etc/subgid
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --log="/var/log/$app/$app.log" --needs_exposed_ports=67
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
@ -159,4 +159,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --time --last
ynh_script_progression --message="Upgrade of $app completed" --last