From f40d88b192fef11bfb63072bd55f522108d9272b Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 14 Jan 2015 16:53:19 -0500 Subject: [PATCH] Updated installer to better accommodate running over existing installs --- install | 9 ++++++++- uninstall | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/install b/install index 2be6ce3b1..803ad5f9e 100755 --- a/install +++ b/install @@ -250,6 +250,13 @@ will be moved to /etc/airtime/airtime.conf.bak" # /etc/init.d startup scripts, services won't work properly rm -rf /usr/lib/airtime/ rm /etc/init.d/airtime-* + # If the user selects an "in-place" install or passes in a web root, + # we need to replace the old apache airtime.conf + rm /etc/apache2/sites-available/airtime.conf + + if [ -d /usr/share/airtime -a web_root = /usr/share/airtime ]; then + rm -rf /usr/share/airtime + fi mv /etc/airtime/airtime.conf /etc/airtime/airtime.conf.bak set -e @@ -526,8 +533,8 @@ chown -R ${web_user}:${web_user} /etc/airtime if [ ! -d "/srv/airtime" ]; then mkdir -p /srv/airtime - chown -R ${web_user}:${web_user} /srv/airtime fi +chown -R ${web_user}:${web_user} /srv/airtime if [ "$install_dependencies" = "f" -a ${_i} -eq 1 ]; then echo -e "Install external binary dependencies? (Y/n): \c" diff --git a/uninstall b/uninstall index ab0f667fa..ccc21aa04 100755 --- a/uninstall +++ b/uninstall @@ -52,6 +52,7 @@ echo -e "The following files, directories, and services will be removed:\n" for i in ${FILES[*]}; do echo $i done +echo -e "\nIf your web root is not listed, you will need to manually remove it." echo -e "\nThis will *permanently* remove Airtime and all related files from your computer. \ Any files in Airtime directories and subdirectories will be deleted. Are you sure you want to proceed? (Y/n): \c"