diff --git a/scripts/install b/scripts/install index 214faed..0ca5d72 100755 --- a/scripts/install +++ b/scripts/install @@ -151,7 +151,7 @@ sudo cp ../conf/robots.txt $final_path runninguser="${app}-ynh" # 1. Create the user # Create a system account for COPS if it doesn't already exists -test="$(grep ^${runninguser}: /etc/passwd)" +test="$(sudo grep ^${runninguser}: /etc/passwd)" if [ -n "${test}" ]; then echo "The user $runninguser does not exist, we can create it" sudo useradd -c "$runninguser system account" \ diff --git a/scripts/restore b/scripts/restore index db1e060..a7009be 100755 --- a/scripts/restore +++ b/scripts/restore @@ -45,7 +45,7 @@ sudo cp -a ./sources/* $final_path/ runninguser="${app}-ynh" # 1. Create the user # Create a system account for COPS if it doesn't already exists -test="$(grep ^${runninguser}: /etc/passwd)" +test="$(sudo grep ^${runninguser}: /etc/passwd)" if [ -n "${test}" ]; then echo "The user $runninguser does not exist, we can create it" sudo useradd -c "$runninguser system account" \ diff --git a/scripts/upgrade b/scripts/upgrade index 394a4af..a9ed45b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,7 +83,7 @@ sudo cp ../conf/robots.txt $final_path runninguser="${app}-ynh" # 1. Create the user # Create a system account for COPS if it doesn't already exists -test="$(grep ^${runninguser}: /etc/passwd)" +test="$(sudo grep ^${runninguser}: /etc/passwd)" if [ -n "${test}" ]; then echo "The user $runninguser does not exist, we can create it" sudo useradd -c "$runninguser system account" \