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:
parent
496bfd2bea
commit
a7899d32a3
1 changed files with 3 additions and 3 deletions
|
@ -60,6 +60,9 @@ if [ -z "$admin" ] || [ -z "$hashedpassword" ]; then
|
||||||
pass_set="false"
|
pass_set="false"
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_app_setting_set --app=$hashedpassword --key=hashedpassword --value=$hashedpassword
|
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
|
else
|
||||||
pass_set="true"
|
pass_set="true"
|
||||||
fi
|
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 "ZT_ADDR=localhost:$(</var/lib/zerotier-one/zerotier-one.port)" >> $env_file
|
||||||
echo "HTTP_PORT=$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
|
# LINK CERTIFICATES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue