1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ztncui_ynh.git synced 2024-09-03 18:06:05 +02:00

Do not override passwd file during upgrade

This commit is contained in:
tituspijean 2022-01-15 16:38:30 +01:00
parent 496bfd2bea
commit a7899d32a3
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -60,6 +60,9 @@ if [ -z "$admin" ] || [ -z "$hashedpassword" ]; then
pass_set="false"
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$hashedpassword --key=hashedpassword --value=$hashedpassword
# Setup user credentials file
echo "{\"$admin\":{\"name\":\"$admin\",\"pass_set\":$pass_set,\"hash\":\"$hashedpassword\"}}" > "$final_path/src/etc/passwd"
else
pass_set="true"
fi
@ -159,9 +162,6 @@ echo "ZT_TOKEN=$(</var/lib/zerotier-one/authtoken.secret)" >> $env_file
echo "ZT_ADDR=localhost:$(</var/lib/zerotier-one/zerotier-one.port)" >> $env_file
echo "HTTP_PORT=$port" >> $env_file
# Setup user credentials file
echo "{\"$admin\":{\"name\":\"$admin\",\"pass_set\":$pass_set,\"hash\":\"$hashedpassword\"}}" >> "$final_path/src/etc/passwd"
#=================================================
# LINK CERTIFICATES
#=================================================