Skip to content
Snippets Groups Projects
Commit 114f9c25 authored by Bob Mottram's avatar Bob Mottram
Browse files

Don't show a configurable domain on onion only installs

parent 13bf39cc
No related branches found
No related tags found
No related merge requests found
......@@ -195,6 +195,7 @@ function web_admin_create_add_apps {
fi
read_config_param DDNS_PROVIDER
read_config_param ONION_ONLY
apps_add_template_filename="$webadmin_install_dir/apps_add_template.html"
pending_installs="$webadmin_install_dir/pending_installs.txt"
icons_dir="$webadmin_install_dir/icons"
......@@ -311,6 +312,14 @@ function web_admin_create_add_apps {
sed -i "s|APPNAME|${app_name}|g" "$filename"
sed -i "s|APPDESCRIPTION|${DESCRIPTION}|g" "$filename"
# remove domain if onion only
if [[ "$ONION_ONLY" != 'no' ]]; then
if grep -q 'install_domain' "$filename"; then
sed -i '/install_domain/d' "$filename"
fi
sed -i "/installappconfirm.php/a <input type=\"hidden\" name=\"install_domain\" value=\"${app_name}.$(hostname)\">" "$filename"
fi
# remove freedns if necessary
if [[ "$DDNS_PROVIDER" != *"freedns"* ]]; then
if grep -q 'freedns_code' "$filename"; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment