#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers #================================================= # CHECK VERSION #================================================= upgrade_type=$(ynh_check_app_version_changed) #================================================= # STANDARD UPGRADE STEPS #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_app_setting_delete --app=$app --key=$YNH_ARCH #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 # Make sure docker is running before installing gitlab-runner if ! systemctl is-active --quiet docker; then ynh_systemd_action --service_name=docker --action=restart --line_match="API listen on /run/docker.sock" fi tempdir="$(mktemp -d)" ynh_setup_source --dest_dir=$tempdir dpkg -i $tempdir/gitlab-runner.deb ynh_secure_remove --file="$tempdir" fi #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Upgrade of $app completed" --last