1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab-runner_ynh.git synced 2024-09-03 19:15:58 +02:00
This commit is contained in:
Éric Gaspar 2023-12-22 15:55:37 +01:00
parent 95acce6695
commit 7063fb1700
3 changed files with 5 additions and 21 deletions

View file

@ -14,8 +14,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Validating installation parameters..."
config_path=/etc/$app
test ! -e "$config_path" || ynh_die "This path already contains a folder"
test ! -e "/etc/$app" || ynh_die "This path already contains a folder"
# By default, the runner will use docker to run your builds. PR are welcomes to implement more executors
executor="docker"
@ -88,7 +87,7 @@ done
#=================================================
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum "$config_path/config.toml"
ynh_store_file_checksum "/etc/$app/config.toml"
#=================================================
# GENERIC FINALIZATION

View file

@ -22,25 +22,10 @@ then
yunohost service remove $app
fi
#=================================================
# UNREGISTER ALL RUNNERS
#=================================================
ynh_script_progression --message="Unregistering all runners..."
ynh_exec_warn_less $app unregister --all-runners
#=================================================
# REMOVE GITLAB RUNNER
#=================================================
ynh_script_progression --message="Removing Gitlab Runner"
dpkg --remove $app
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..."
ynh_secure_remove --file="/etc/$app"
#=================================================

View file

@ -15,8 +15,8 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Validating restoration parameters..."
test ! -d $config_path \
|| ynh_die --message="There is already a directory: $config_path "
test ! -d /etc/$app \
|| ynh_die --message="There is already a directory: /etc/$app "
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -64,7 +64,7 @@ done
#=================================================
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum "$config_path/config.toml"
ynh_store_file_checksum "/etc/$app/config.toml"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST