[microdecision] Delete user pi only if it exists...

This commit is contained in:
Alexandre Aubin 2018-04-02 01:00:41 +02:00 committed by GitHub
parent 5a66ff9e0e
commit 38a7646f06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {