1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/plume_ynh.git synced 2024-09-03 20:15:54 +02:00

Update of the install script (#5)

* Changing Curl option for rustup

* Update rustup sh options

* Update install

* Adding Cargo PATH

* Add  Source Path to cargo

* Update PATH

* Update PATH

* Update source

* Update PATH

* Update Path to Cargo

* Update Cargo and Rustup install

* Change Rustup installation path

* Update Rustup Path

* Update PATH

* Update PATH

* trying to launch Cargo

* Update Path to Cargo

* Update CARGO PATH

* Add Search Init Step
This commit is contained in:
yalh76 2019-01-07 11:56:25 +01:00 committed by anmol26s
parent da37bfaba9
commit 4189a95a55
2 changed files with 10 additions and 6 deletions

View file

@ -158,13 +158,14 @@ chown -R $app: $final_path
# App settings # App settings
( cd $final_path && sudo -u "$app" curl -sf -L https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly --date=2018-07-17 ) ( cd $final_path && sudo -u "$app" RUSTUP_HOME=$final_path/.rustup CARGO_HOME=$final_path/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=nightly' )
export PATH="$PATH:/var/www/$app/.cargo/bin:/var/$app/.local/bin:/usr/local/sbin" PATH="$PATH:/var/www/$app/.cargo/bin"
export PATH="$PATH:/var/www/$app/.cargo/bin:/usr/local/sbin"
export FEATURES=postgres export FEATURES=postgres
( cd $final_path/$app && sudo -u "$app" cargo install diesel_cli --no-default-features --features postgres --version '=1.3.0' ) ( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/cargo install diesel_cli --no-default-features --features postgres --version '=1.3.0' )
( cd $final_path/$app && diesel migration run ) ( cd $final_path/$app && diesel migration run )
( cd $final_path/$app && sudo -u "$app" cargo install --no-default-features --features postgres ) ( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/cargo install --no-default-features --features postgres )
( cd $final_path/$app && sudo -u "$app" cargo install --no-default-features --features postgres --path plume-cli ) ( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/cargo install --no-default-features --features postgres --path plume-cli )
# Add new instance # Add new instance
if [ $registration -eq 1 ] if [ $registration -eq 1 ]
@ -177,6 +178,9 @@ fi
# Add admin user # Add admin user
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/plm users new --admin -n "$admin" -N "$admin" --email "$admin_email" --password "$admin_pass" ) ( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/plm users new --admin -n "$admin" -N "$admin" --email "$admin_email" --password "$admin_pass" )
# Initialise search index
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/plm search init -p $final_path/$app )
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================

View file

@ -49,7 +49,7 @@ fi
ynh_remove_app_dependencies ynh_remove_app_dependencies
export PATH="$PATH:/var/www/$app/.cargo/bin:/var/$app/.local/bin:/usr/local/sbin" export PATH="$PATH:/var/www/$app/.cargo/bin:/var/$app/.local/bin:/usr/local/sbin"
export FEATURES=postgres export FEATURES=postgres
( cd $final_path/$app && sudo -u "$app" cargo uninstall diesel_cli ) ( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/cargo uninstall diesel_cli )
if [ -d "/usr/local/lib/rustlib" ]; then if [ -d "/usr/local/lib/rustlib" ]; then
sudo /usr/local/lib/rustlib/uninstall.sh sudo /usr/local/lib/rustlib/uninstall.sh