mirror of
https://github.com/YunoHost-Apps/plume_ynh.git
synced 2024-09-03 20:15:54 +02:00
Correct final_path
This commit is contained in:
parent
a7fa42867c
commit
ebf93d51fc
4 changed files with 17 additions and 15 deletions
|
@ -32,6 +32,8 @@ db_name=$(ynh_app_setting_get "$app" psql_db)
|
||||||
|
|
||||||
# Stop Plume for backup
|
# Stop Plume for backup
|
||||||
systemctl stop "$app"
|
systemctl stop "$app"
|
||||||
|
# App needs time to stop
|
||||||
|
sleep 10
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD BACKUP STEPS
|
# STANDARD BACKUP STEPS
|
||||||
|
|
|
@ -202,27 +202,27 @@ chown -R $app: $final_path
|
||||||
|
|
||||||
# App settings
|
# App settings
|
||||||
( 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' )
|
( 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' )
|
||||||
PATH="$PATH:/var/www/$app/.cargo/bin"
|
PATH="$PATH:$final_path/.cargo/bin"
|
||||||
export PATH="$PATH:/var/www/$app/.cargo/bin:/usr/local/sbin"
|
export PATH="$PATH:$final_path/.cargo/bin:/usr/local/sbin"
|
||||||
export FEATURES=postgres
|
export FEATURES=postgres
|
||||||
( 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 && sudo -u "$app" $final_path/.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" /var/www/$app/.cargo/bin/cargo install --no-default-features --features postgres )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.cargo/bin/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 --path plume-cli )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.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 ]
|
||||||
then
|
then
|
||||||
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/plm instance new --domain "$domain" --name "$instance_name" -l 'CC-BY' )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.cargo/bin/plm instance new --domain "$domain" --name "$instance_name" -l 'CC-BY' )
|
||||||
else
|
else
|
||||||
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/plm instance new --private --domain "$domain" --name "$instance_name" -l 'CC-BY' )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.cargo/bin/plm instance new --private --domain "$domain" --name "$instance_name" -l 'CC-BY' )
|
||||||
fi
|
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" $final_path/.cargo/bin/plm users new --admin -n "$admin" -N "$admin" --email "$admin_email" --password "$admin_pass" )
|
||||||
|
|
||||||
# Initialise search index
|
# Initialise search index
|
||||||
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/plm search init -p $final_path/$app )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.cargo/bin/plm search init -p $final_path/$app )
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
|
@ -47,9 +47,9 @@ fi
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
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:$final_path/.cargo/bin:/var/$app/.local/bin:/usr/local/sbin"
|
||||||
export FEATURES=postgres
|
export FEATURES=postgres
|
||||||
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/cargo uninstall diesel_cli )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.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
|
||||||
|
|
|
@ -126,12 +126,12 @@ ynh_system_user_create "$app" "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
( 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' )
|
( 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' )
|
||||||
PATH="$PATH:/var/www/$app/.cargo/bin"
|
PATH="$PATH:$final_path/.cargo/bin"
|
||||||
export PATH="$PATH:/var/www/$app/.cargo/bin:/usr/local/sbin"
|
export PATH="$PATH:$final_path/.cargo/bin:/usr/local/sbin"
|
||||||
export FEATURES=postgres
|
export FEATURES=postgres
|
||||||
chown -R "$app":"$app" "$final_path"
|
chown -R "$app":"$app" "$final_path"
|
||||||
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/cargo install --no-default-features --features postgres --force )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.cargo/bin/cargo install --no-default-features --features postgres --force )
|
||||||
( cd $final_path/$app && sudo -u "$app" /var/www/$app/.cargo/bin/cargo install --no-default-features --features postgres --path plume-cli --force )
|
( cd $final_path/$app && sudo -u "$app" $final_path/.cargo/bin/cargo install --no-default-features --features postgres --path plume-cli --force )
|
||||||
( cd $final_path/$app && diesel migration run )
|
( cd $final_path/$app && diesel migration run )
|
||||||
|
|
||||||
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
||||||
|
|
Loading…
Add table
Reference in a new issue