From db03be0024e85a159722ff52407ce0db89078dd8 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 28 Nov 2023 17:35:34 +0200 Subject: [PATCH] remove sudo --- templates/install_mastodon.sh.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/install_mastodon.sh.erb b/templates/install_mastodon.sh.erb index 97ebcea..be73795 100644 --- a/templates/install_mastodon.sh.erb +++ b/templates/install_mastodon.sh.erb @@ -7,16 +7,16 @@ if [ ! -e '<%= @mastodon_home %>/.mastodon_install' ]; then export PATH="<%= @mastodon_home %>/.rbenv/bin:$PATH" eval "$(<%= @mastodon_home %>/.rbenv/bin/rbenv init -)" if [ ! -e '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/ruby' ]; then - sudo -u <%= @mastodon_user %> RUBY_CONFIGURE_OPTS=--with-jemalloc '<%= @mastodon_home %>/.rbenv/bin/rbenv' install '<%= @ruby_version %>' + RUBY_CONFIGURE_OPTS=--with-jemalloc '<%= @mastodon_home %>/.rbenv/bin/rbenv' install '<%= @ruby_version %>' fi - sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/bin/rbenv' global '<%= @ruby_version %>' - sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/gem' install bundler --no-document + '<%= @mastodon_home %>/.rbenv/bin/rbenv' global '<%= @ruby_version %>' + '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/gem' install bundler --no-document echo "Configuring bundle..." - sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/shims/bundle' config deployment 'true' - sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/shims/bundle' config without 'development test' + '<%= @mastodon_home %>/.rbenv/shims/bundle' config deployment 'true' + '<%= @mastodon_home %>/.rbenv/shims/bundle' config without 'development test' echo "Running bundle install..." - sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/.rbenv/shims/bundle' install -j$(getconf _NPROCESSORS_ONLN) + '<%= @mastodon_home %>/.rbenv/shims/bundle' install -j$(getconf _NPROCESSORS_ONLN) echo "Running yarn install..." - sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/live/bin/yarn' install --pure-lockfile + '<%= @mastodon_home %>/live/bin/yarn' install --pure-lockfile echo $(date +s) > '<%= @mastodon_home %>/.mastodon_install' fi