diff --git a/src/freedombone-installer b/src/freedombone-installer index 6a018ccc9cd47258bc85d45160045a47d6268d87..ca1b9c5d58add3e401ba1ea8dd6c83a355b0243b 100755 --- a/src/freedombone-installer +++ b/src/freedombone-installer @@ -32,6 +32,7 @@ PROJECT_NAME='freedombone' export TEXTDOMAIN=${PROJECT_NAME}-installer export TEXTDOMAINDIR="/usr/share/locale" +VERSION=3.1 INSTALL_STATE_FIRST_BOOT=0 INSTALL_STATE_WEBADMIN_PASSWORD_CTEATED=1 @@ -93,6 +94,14 @@ backup_progress_file=/root/.backup_progress.txt restore_progress_file=/root/.backup_progress.txt format_progress_file=/root/.format_progress.txt +function webadmin_update_version { + local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local + webadmin_install_dir="/var/www/${local_hostname}/htdocs/admin" + if [ -f "$webadmin_install_dir/about.html" ]; then + sed -i "s|\"versiontext\".*|\"versiontext\">$VERSION</p>|g" "$webadmin_install_dir/about.html" + fi +} + function web_admin_create_add_apps { appslist_add_filename="$webadmin_install_dir/apps_add.html" @@ -723,6 +732,7 @@ function after_setup_has_finished { web_admin_create_users web_admin_create_installed_apps web_admin_create_add_apps + webadmin_update_version # remove default user if [ -d /home/fbone ]; then @@ -1365,6 +1375,7 @@ function change_language { regenerate_blocklist touch "$system_monitor_file" update_system_monitor + webadmin_update_version fi chown -R www-data:www-data "$webadmin_install_dir/*" diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin index 8aa6571de5fb6f48ce74957f3659071d214e017a..9460ffcb98631bbe02fd333e12fc274595844c46 100755 --- a/src/freedombone-utils-webadmin +++ b/src/freedombone-utils-webadmin @@ -751,6 +751,14 @@ function webadmin_change_language { fi } +function webadmin_update_version { + local_hostname=$(grep 'host-name' /etc/avahi/avahi-daemon.conf | awk -F '=' '{print $2}').local + webadmin_install_dir="/var/www/${local_hostname}/htdocs/admin" + if [ -f "$webadmin_install_dir/about.html" ]; then + sed -i "s|\"versiontext\".*|\"versiontext\">$VERSION</p>|g" "$webadmin_install_dir/about.html" + fi +} + function install_web_admin { # This is intended as an admin web user interface # similar to Plinth or the yunohost @@ -937,6 +945,8 @@ function install_web_admin { webadmin_update_system_monitor webadmin_change_language + + webadmin_update_version } # NOTE: deliberately no exit 0 diff --git a/webadmin/EN/about.html b/webadmin/EN/about.html index 9f825334a743972e9b4ef33ac3d1063e2863ed5e..d78ede4008acc77e41c763ea98d0e43948016c83 100644 --- a/webadmin/EN/about.html +++ b/webadmin/EN/about.html @@ -15,6 +15,13 @@ padding: 32px; } + .versiontext { + color: #72a7cf; + text-align: center; + font-size: 120%; + font-weight: bold; + } + #iconpic { width: 20%; height: auto; @@ -65,6 +72,8 @@ <div class="header"> <a href="index.html"><img id="headerpic" class="img-responsive" src="images/logo.png"></a> + <p class="versiontext">Version</p> + <p class="desc">This is a server system which enables you to run internet apps such as a blog or federated social network.</p> <p class="desc">Freedombone started in 2013. It was initially based on the Beaglebone Black hardware and inspired by the FreedomBox idea of an inexpensive and simple to manage internet server for the home.</p>