More silent install

This commit is contained in:
Jean-Baptiste Holcroft 2018-05-21 13:44:19 +02:00
parent bcd3fdda84
commit da65fa28ad
3 changed files with 11 additions and 7 deletions

View file

@ -91,7 +91,7 @@ mkdir -p "$datadir"
ynh_install_nodejs 8
# install yarn
wget https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn_1.6.0_all.deb
wget -nv https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn_1.6.0_all.deb
echo "96866d835da94a1f01a616f3d637c9100e826f65cb38a65e5d96ccf01ff6d692 yarn_1.6.0_all.deb" | sha256sum -c || ynh_die
dpkg -i yarn_1.6.0_all.deb
@ -140,7 +140,7 @@ touch "$final_path/config/local-production.json"
(
cd "$final_path"
yarn install --production --pure-lockfile --cache-folder /var/cache/yarn/
yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/
)
#=================================================
@ -215,7 +215,11 @@ systemctl start "$app"
#=================================================
# we need to wait for the service to init peertube's database
(cd "/var/www/$app" && sleep 15 && exec /bin/sh -c "echo $admin_pass | NODE_CONFIG_DIR=/var/www/$app/config NODE_ENV=production PATH=/opt/node_n/bin:$PATH npm run reset-password -- -u root")
(
cd "$final_path"
sleep 15
echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production PATH="/opt/node_n/bin:$PATH" npm run reset-password -- -u root
)
# Give permisiion to the final_path
chown -R "$app":"$app" "$final_path" "$datadir"

View file

@ -94,7 +94,7 @@ chown -R "$app":"$app" "$datadir"
# install nodejs
ynh_install_nodejs 8
wget https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn_1.6.0_all.deb
wget -nv https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn_1.6.0_all.deb
echo "96866d835da94a1f01a616f3d637c9100e826f65cb38a65e5d96ccf01ff6d692 yarn_1.6.0_all.deb" | sha256sum -c || ynh_die
dpkg -i yarn_1.6.0_all.deb
@ -132,7 +132,7 @@ ynh_restore_file "/etc/logrotate.d/$app"
(
cd "$final_path"
yarn install --production --pure-lockfile --cache-folder /var/cache/yarn/
yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/
)
# Set right permissions for curl install

View file

@ -85,7 +85,7 @@ ynh_system_user_create "$app"
ynh_install_nodejs 8
# install yarn
wget https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn_1.6.0_all.deb
wget -nv https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn_1.6.0_all.deb
echo "96866d835da94a1f01a616f3d637c9100e826f65cb38a65e5d96ccf01ff6d692 yarn_1.6.0_all.deb" | sha256sum -c || ynh_die
dpkg -i yarn_1.6.0_all.deb
@ -119,7 +119,7 @@ ynh_secure_remove "$tmpdir"
(
cd "$final_path"
yarn install --production --pure-lockfile --cache-folder /var/cache/yarn/
yarn install --production --pure-lockfile --silent --cache-folder /var/cache/yarn/
)