From 5a08ca9354ae84d3a0627de5daf23961eea92bf1 Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@freedombone.net> Date: Thu, 16 Aug 2018 14:17:07 +0100 Subject: [PATCH] Create logs for adding and removing apps --- src/freedombone-installer | 6 ++++-- src/freedombone-utils-webadmin | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedombone-installer b/src/freedombone-installer index 45c4f4f52..614b316a3 100755 --- a/src/freedombone-installer +++ b/src/freedombone-installer @@ -840,7 +840,8 @@ function install_apps_from_webadmin { fi fi - /usr/local/bin/${PROJECT_NAME}-addremove add "${app_name}" + /usr/local/bin/${PROJECT_NAME}-addremove add "${app_name}" > "$webadmin_install_dir/log.txt" + chown www-data:www-data "$webadmin_install_dir/log.txt" fi # remove the line sed -i "/$linestr/d" "$pending_installs" @@ -861,7 +862,8 @@ function remove_apps_from_webadmin { if [[ "$linestr" != *'_running'* ]]; then sed -i "s|${app_name}|${app_name}_running|g" "$pending_removes" fi - /usr/local/bin/${PROJECT_NAME}-addremove remove "${app_name}" + /usr/local/bin/${PROJECT_NAME}-addremove remove "${app_name}" > "$webadmin_install_dir/log.txt" + chown www-data:www-data "$webadmin_install_dir/log.txt" fi # remove the line sed -i "/$linestr/d" "$pending_removes" diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin index 0ba50870e..bb1a1c35d 100755 --- a/src/freedombone-utils-webadmin +++ b/src/freedombone-utils-webadmin @@ -626,6 +626,7 @@ function image_install_web_admin { cp -r "$rootdir/usr/share/${PROJECT_NAME}/webadmin"/* "$rootdir$webadmin_install_dir" cp "$rootdir/usr/share/${PROJECT_NAME}/webadmin/${language_subdir}"/*.html "$rootdir$webadmin_install_dir" cp "$rootdir$webadmin_install_dir/${language_subdir}"/index.html "$rootdir$webadmin_install_dir"/index.prev + read_config_param ONION_ONLY if [[ "$ONION_ONLY" != 'no' ]]; then web_admin_onion_only fi -- GitLab