use installed file
This commit is contained in:
parent
4ea6af716e
commit
a64dd21793
2 changed files with 3 additions and 2 deletions
|
@ -196,7 +196,7 @@ class mastodon (
|
|||
}
|
||||
exec { 'install_mastodon':
|
||||
command => '/usr/local/bin/install_mastodon.sh',
|
||||
creates => "${mastodon_home}/.rbenv/versions/3.2.2/bin/bundler",
|
||||
creates => "${mastodon_home}/./.mastodon_install",
|
||||
path => "${mastodon_home}/.rbenv/shims:${mastodon_home}/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
timeout => 0,
|
||||
require => File['/usr/local/bin/install_mastodon.sh'],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ ! -e '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/ruby' ]; then
|
||||
if [ ! -e '<%= @mastodon_home %>/.mastodon_install' ]; then
|
||||
cd '<%= @mastodon_home %>'
|
||||
echo "Installing ruby..."
|
||||
source '<%= @mastodon_home %>/.bashrc'
|
||||
|
@ -15,4 +15,5 @@ if [ ! -e '<%= @mastodon_home %>/.rbenv/versions/<%= @ruby_version %>/bin/ruby'
|
|||
sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/live/bin/bundle' install -j$(getconf _NPROCESSORS_ONLN)
|
||||
echo "Running yarn install..."
|
||||
sudo -u <%= @mastodon_user %> '<%= @mastodon_home %>/live/bin/yarn' install --pure-lockfile
|
||||
echo $(date +s) > '<%= @mastodon_home %>/.mastodon_install'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue