mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
reorder admin password creation
This commit is contained in:
parent
fac4409c8c
commit
22d9806ffc
1 changed files with 27 additions and 33 deletions
|
@ -163,13 +163,9 @@ ynh_store_file_checksum "$final_path/config/production.yaml"
|
||||||
# BUILD YARN DEPENDENCIES
|
# BUILD YARN DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
pushd "$final_path"
|
||||||
touch "$final_path/config/local-production.json"
|
|
||||||
|
|
||||||
(
|
|
||||||
cd "$final_path"
|
|
||||||
yarn install --production --pure-lockfile
|
yarn install --production --pure-lockfile
|
||||||
)
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
@ -179,32 +175,6 @@ ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHANGE PEERTUBE ADMIN PASSWORD AFTER INITIAL GEN
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# we need to wait for the service to init peertube's database
|
|
||||||
(
|
|
||||||
cd "$final_path"
|
|
||||||
sleep 30
|
|
||||||
echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root
|
|
||||||
)
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SEND A README FOR THE ADMIN
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
message=" $app was successfully installed :)
|
|
||||||
|
|
||||||
Please open your $app domain: https://$domain$path_url
|
|
||||||
|
|
||||||
The admin username is: root
|
|
||||||
The admin password is: $admin_pass
|
|
||||||
|
|
||||||
If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/peertube_ynh"
|
|
||||||
|
|
||||||
ynh_send_readme_to_admin "$message"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -218,7 +188,6 @@ ynh_send_readme_to_admin "$message"
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R "$app":"$app" $final_path
|
chown -R "$app":"$app" $final_path
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -250,6 +219,31 @@ ynh_print_info "Start service..."
|
||||||
|
|
||||||
systemctl enable "$app"
|
systemctl enable "$app"
|
||||||
systemctl start "$app"
|
systemctl start "$app"
|
||||||
|
sleep 30
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CHANGE PEERTUBE ADMIN PASSWORD AFTER INITIAL GEN
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# we need to wait for the service to init peertube's database
|
||||||
|
pushd "$final_path"
|
||||||
|
echo $admin_pass | NODE_CONFIG_DIR="$final_path/config" NODE_ENV=production npm run reset-password -- -u root
|
||||||
|
popd
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SEND A README FOR THE ADMIN
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
message=" $app was successfully installed :)
|
||||||
|
|
||||||
|
Please open your $app domain: https://$domain$path_url
|
||||||
|
|
||||||
|
The admin username is: root
|
||||||
|
The admin password is: $admin_pass
|
||||||
|
|
||||||
|
If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/peertube_ynh"
|
||||||
|
|
||||||
|
ynh_send_readme_to_admin "$message"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue