diff --git a/scripts/_common.sh b/scripts/_common.sh index 3290ea0..f43edad 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -26,7 +26,7 @@ extract_freshrss() { # retrieve and extract FreshRSS tarball rc_tarball="${DESTDIR}/freshrss.tar.gz" - sudo wget -q -O "$rc_tarball" "$FRESHRSS_SOURCE_URL" \ + wget -q -O "$rc_tarball" "$FRESHRSS_SOURCE_URL" \ || ynh_die "Unable to download FreshRSS tarball" echo "$FRESHRSS_SOURCE_SHA256 $rc_tarball" | sha256sum -c >/dev/null \ || ynh_die "Invalid checksum of downloaded tarball" diff --git a/scripts/install b/scripts/install index b5c83a3..a059698 100755 --- a/scripts/install +++ b/scripts/install @@ -44,8 +44,8 @@ ynh_mysql_create_db "$db_name" "$db_user" "$db_pwd" ynh_app_setting_set "$app" mysqlpwd "$db_pwd" # Copy files to the right place -TMPDIR=$(sudo mktemp -d) -sudo chmod 655 "$TMPDIR" +TMPDIR=$(mktemp -d) +chmod 755 "$TMPDIR" extract_freshrss "$TMPDIR" $TMPDIR/cli/do-install.php --default_user $admin_user --auth_type http_auth --environment production --base_url $domain/$path --title FreshRSS --api_enabled --db-type mysql --db-host localhost --db-user $db_user --db-password $db_pwd --db-base $db_name diff --git a/scripts/upgrade b/scripts/upgrade index d7769d4..e31fba7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,8 +23,8 @@ if [ -f $FINAL_PATH/data/user.php.dist ]; then fi # Create tmp directory and install app inside -TMPDIR=$(sudo mktemp -d) -sudo chmod 655 "$TMPDIR" +TMPDIR=$(mktemp -d) +chmod 755 "$TMPDIR" extract_freshrss "$TMPDIR" # Restore config