mirror of
https://github.com/YunoHost-Apps/invidious_ynh.git
synced 2024-09-03 19:15:55 +02:00
Update install
This commit is contained in:
parent
7f05d6ffdc
commit
429d77dc87
1 changed files with 22 additions and 15 deletions
|
@ -52,14 +52,17 @@ pushd "$install_dir"
|
|||
git reset --hard --quiet $version_commit
|
||||
popd
|
||||
|
||||
for i in $install_dir/config/sql/*.sql ; do
|
||||
ynh_replace_string --match_string="kemal" --replace_string=$db_user --target_file="$i" ;
|
||||
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "$i" ;
|
||||
done
|
||||
#for i in $install_dir/config/sql/*.sql ; do
|
||||
# ynh_replace_string --match_string="kemal" --replace_string=$db_user --target_file="$i" ;
|
||||
# ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "$i" ;
|
||||
#done
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
pushd "$install_dir"
|
||||
make
|
||||
popd
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -68,6 +71,20 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=3
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/config.yml" --destination="$install_dir/config/config.yml"
|
||||
|
||||
chmod 600 "$install_dir/config/config.yml"
|
||||
chown $app:$app "$install_dir/config/config.yml"
|
||||
|
||||
pushd "$install_dir"
|
||||
./invidious --migrate
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
@ -76,7 +93,7 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=60
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_exec_warn_less shards install --production
|
||||
#ynh_exec_warn_less shards install --production
|
||||
ynh_exec_warn_less crystal build $install_dir/src/invidious.cr --release
|
||||
popd
|
||||
|
||||
|
@ -95,16 +112,6 @@ ynh_add_systemd_config
|
|||
|
||||
yunohost service add $app --description="Invidious is an alternative front-end to YouTube" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/config.yml" --destination="$install_dir/config/config.yml"
|
||||
|
||||
chmod 600 "$install_dir/config/config.yml"
|
||||
chown $app:$app "$install_dir/config/config.yml"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue