From 6fd4fcc5989a8a263b3104745b0a9982c41de6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 4 Mar 2018 16:48:08 +0100 Subject: [PATCH] Fix git authentication by ssh --- scripts/install | 5 ++++- scripts/restore | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 0f474c6..15828e0 100644 --- a/scripts/install +++ b/scripts/install @@ -53,7 +53,10 @@ ynh_app_setting_set $app web_port $port ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass" # Add users -ynh_system_user_create $app +# We can't use the official helper because we need to set the shell for the login +test getent passwd "$app" &>/dev/null || \ + useradd -d "$DATADIR" --system --user-group "$app" --shell /bin/bash || \ + ynh_die "Unable to create $app system account" # create needed directories create_dir diff --git a/scripts/restore b/scripts/restore index 3ea6635..27b6ee5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,7 +35,10 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder" #================================================= # Add users -ynh_system_user_create $app +# We can't use the official helper because we need to set the shell for the login +test getent passwd "$app" &>/dev/null || \ + useradd -d "$DATADIR" --system --user-group "$app" --shell /bin/bash || \ + ynh_die "Unable to create $app system account" # Restore all files ynh_restore