mirror of
https://github.com/YunoHost-Apps/borgwarehouse_ynh.git
synced 2024-09-03 18:16:17 +02:00
Update install
This commit is contained in:
parent
20e3d35847
commit
06b300bb10
1 changed files with 14 additions and 10 deletions
|
@ -36,14 +36,14 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
|||
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir/app"
|
||||
#ynh_setup_source --dest_dir="$install_dir/app"
|
||||
|
||||
mkdir $install_dir/.ssh && chmod 700 $install_dir/.ssh
|
||||
touch $install_dir/.ssh/authorized_keys && chmod 600 $install_dir/.ssh/authorized_keys
|
||||
mkdir $install_dir/repos && chmod 700 $install_dir/repos
|
||||
mkdir /home/borgwarehouse/.ssh && chmod 700 /home/borgwarehouse/.ssh
|
||||
touch /home/borgwarehouse/.ssh/authorized_keys && chmod 600 /home/borgwarehouse/.ssh/authorized_keys
|
||||
mkdir /home/borgwarehouse/repos && chmod 700 /home/borgwarehouse/repos
|
||||
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod 700 $install_dir/app/helpers/shells/*
|
||||
chown -R $app:www-data "/home/borgwarehouse/"
|
||||
chmod 700 /home/borgwarehouse/app/helpers/shells/*
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
|
@ -68,17 +68,21 @@ yunohost service add $app --description="WebUI for BorgBackup" --log="/var/log/$
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
ynh_add_config --template=".env" --destination="$install_dir/app/.env.local"
|
||||
ynh_add_config --template=".env" --destination="/home/borgwarehouse/app/.env.local"
|
||||
|
||||
chmod 400 "$install_dir/app/.env.local"
|
||||
chown $app:$app "$install_dir/app/.env.local"
|
||||
chmod 400 "/home/borgwarehouse/app/.env.local"
|
||||
chown $app:$app "/home/borgwarehouse/app/.env.local"
|
||||
|
||||
#=================================================
|
||||
# INSTALL BORGWARHOUSE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing $app..." --weight=10
|
||||
|
||||
pushd $install_dir/app
|
||||
pushd /home/borgwarehouse
|
||||
git clone https://github.com/Ravinou/borgwarehouse.git app
|
||||
popd
|
||||
|
||||
pushd /home/borgwarehouse/app
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm ci
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production $ynh_npm run build
|
||||
|
|
Loading…
Reference in a new issue