From 38a7646f06660cb442541adc13720306f650baf0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 2 Apr 2018 01:00:41 +0200 Subject: [PATCH] [microdecision] Delete user pi only if it exists... --- install_yunohost | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install_yunohost b/install_yunohost index 9c487d0..0ff1af8 100755 --- a/install_yunohost +++ b/install_yunohost @@ -466,7 +466,9 @@ function user_pi_logged_out() { } function del_user_pi() { - deluser --remove-all-files pi >> $YUNOHOST_LOG 2>&1 + if id "pi" >/dev/null 2>&1; then + deluser --remove-all-files pi >> $YUNOHOST_LOG 2>&1 + fi } function setup_firstboot() {