Use getop for helpers

This commit is contained in:
Josué Tille
2019-08-01 14:01:59 +02:00
parent 7f57b92170
commit c09462555a
6 changed files with 19 additions and 20 deletions

View File

@ -39,7 +39,7 @@ systemctl stop "$app".service
[[ $YNH_APP_ID == "gogs" ]] \
&& [[ "$(cat "/opt/$app/templates/.VERSION")" != 0.11.79.1211 ]] \
&& ynh_die "It look like that you have an old gogs install. You need first upgrade gogs instance (id : $gogs_migrate_id) and after migrate to gitea."
&& ynh_die --message "It look like that you have an old gogs install. You need first upgrade gogs instance (id : $gogs_migrate_id) and after migrate to gitea."
ynh_handle_app_migration gogs gogs_migrations
if [[ $migration_process -eq 1 ]]; then
@ -55,7 +55,7 @@ if [[ $migration_process -eq 1 ]]; then
ynh_system_user_delete $old_app
test getent passwd "$app" &>/dev/null || \
useradd -d "$DATADIR" --system --user-group "$app" --shell /bin/bash || \
ynh_die "Unable to create $app system account"
ynh_die --message "Unable to create $app system account"
# Clean old binary
ynh_secure_remove --file=$final_path/gogs