From a1cd5fac61e8ad2c3bcf0e6f82edfb27db70d6a4 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Fri, 24 Feb 2017 17:20:38 +0000 Subject: [PATCH] Missing sudo --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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" \