Unable to uninstall version 3.2.4
Hello,
I would like to upgrade my ubuntu VM running omada controller 3.2.4 to the latest version 4.
I have read the raccomanded procedure and I think that the first thing to do will be to uninstall the old one, then install the new and import the settings.
I then tried this procedure:
https://www.tp-link.com/us/support/faq/2609/
But I immediately got stuck since there is no uninstall.sh in my system.
Is there a procedure to manually uninstall the olde version?
Otherwise I can make a new VM and install everything from scratch but I am unsure on how the acces point will react: will they simply be listed in the new controller or some work will be required to manage them?
Thanks to anyone will answer me.
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
@truten maybe you can search the file with this command "sudo find / -name uninstall.sh"
or you can try to make a new file in the path with "touch uninstall.sh", edit the file with "nano uninstall.sh", and paste below contents to the file by right-click, the content is copied from my uninstall.sh fil:
.
#!/bin/bash
NAME="omada"
DESC="Omada Controller"
DEST_DIR=/opt/tplink
DEST_FOLDER=EAPController
INSTALLDIR=${DEST_DIR}/${DEST_FOLDER}
#INSTALLDIR=$(dirname $(readlink -f $0))
LINK=/etc/init.d/tpeap
LINK_CMD=/usr/bin/tpeap
MAIN_CLASS="com.tp_link.eap.start.EapLinuxMain"
#Define the variable to judge that if
#the execution of uninstall.sh is for upgrading.
UNINSTALL_TYPE=$1
user_confirm() {
if [ "${UNINSTALL_TYPE}" == "upgrade" ]; then
return 0
fi
while true
do
echo -n "${DESC} will be uninstalled from [${INSTALLDIR}] (y/n): "
read input
confirm=`echo $input | tr '[a-z]' '[A-Z]'`
if [ "$confirm" == "Y" -o "$confirm" == "YES" ]; then
return 0
elif [ "$confirm" == "N" -o "$confirm" == "NO" ]; then
return 1
fi
done
}
user_keep_db() {
if [ "${UNINSTALL_TYPE}" == "upgrade" ]; then
return 0
fi
while true
do
echo -n "Do you want to backup database [${INSTALLDIR}/data/db] (y/n): "
read input
confirm=`echo $input | tr '[a-z]' '[A-Z]'`
if [ "$confirm" == "Y" -o "$confirm" == "YES" ]; then
return 0
elif [ "$confirm" == "N" -o "$confirm" == "NO" ]; then
return 1
fi
done
}
# return: 0, exist; 1, not exist;
link_exist() {
if test -x $1; then
if [ ${INSTALLDIR}/bin/control.sh = $(readlink -f $1) ]; then
return 0
fi
fi
return 1
}
# return: 1,running; 0, not running;
is_running() {
[ -z "$(pgrep -f ${MAIN_CLASS})" ] && {
return 0
}
return 1
}
# root permission check
check_perms() {
[ $(id -ru) != 0 ] && { echo "You must be root to uninstall the ${DESC}. Exit." 1>&2; exit 1; }
}
# root permission check
check_perms
# user confirm
if ! user_confirm; then
exit
fi
NEED_KEEP_DB=0
if ! user_keep_db; then
NEED_KEEP_DB=0
else
NEED_KEEP_DB=1
fi
echo "========================"
echo "Uninstallation start ..."
link_exist ${LINK}
exist=$?
count=0
while [ $exist -eq 1 ]
do
count=`expr ${count} + 1`
link_exist ${LINK}${count}
exist=$?
if [ $count -gt 100 ]; then
# not found LINK
break;
fi
done
for i in `seq 1 3` ; do
is_running
[ 0 == $? ] && {
break
}
echo "${DESC} is running, going to stop it."
if [ -x ${INSTALLDIR}/bin/control.sh ]; then
${INSTALLDIR}/bin/control.sh stop
else
echo "Can't stop ${DESC}! You should stop it by yourself before uninstall."
exit
fi
sleep 3
done
# removing
if [ $count -eq 0 ]; then
link_name=${LINK}
link_cmd_name=${LINK_CMD}
else
link_name=${LINK}${count}
link_cmd_name=${LINK_CMD}${count}
fi
update-rc.d $(basename ${link_name}) remove 2>/dev/null
result=$?
if [ $result -ne 0 ]; then
chkconfig --del ${link_name}
chkconfig --del ${link_cmd_name}
fi
rm ${link_name}
rm ${link_cmd_name}
BACKUP_FOLDER=${INSTALLDIR}/../eap_db_backup
DB_FILE_NAME=eap.db.tar.gz
MAP_FILE_NAME=eap.map.tar.gz
if [ $NEED_KEEP_DB == 1 ]; then
mkdir $BACKUP_FOLDER > /dev/null 2>&1
cd ${INSTALLDIR}/data
tar zcvf $DB_FILE_NAME db
cp -f $DB_FILE_NAME $BACKUP_FOLDER/
#backup map
tar zcvf $MAP_FILE_NAME map
cp -f $MAP_FILE_NAME $BACKUP_FOLDER/
fi
rm -rf ${INSTALLDIR}
echo "Uninstall ${DESC} successfully."
- Copy Link
- Report Inappropriate Content
In case anyone needs, I found a solution that worked for me (ubuntu 16.04):
remove omada package (it will remove dependencies as well, you may also need to run with --purge option):
dpkg -r omada
list the packages (ensure omada package is not there):
dpkg-query -l | less
install the new package:
dpkg -i omada_v4.2.8_linux_x64.deb
install all dependencies:
sudo apt-get -f install
- Copy Link
- Report Inappropriate Content
Dear @truten,
I then tried this procedure:
https://www.tp-link.com/us/support/faq/2609/
But I immediately got stuck since there is no uninstall.sh in my system.
Is there a procedure to manually uninstall the olde version?
What do you mean that there is no uninstall.sh in your system?
Have you read this FAQ and tried input the uninstallation command on your Linux?
https://www.tp-link.com/support/faq/2917/
If it doesn't work, is there showing any error message?
- Copy Link
- Report Inappropriate Content
@Fae Hello,
I mean that the are no uninstall.sh file in my /opt/tplink/EAPController directory.
Due to this the command stated in the faqs is not working on my VM.
I don't know if I am doing any mistake (even if it is just a simple copy-paste of a command) or something went wrong during the setup of my controller.
Thanks
- Copy Link
- Report Inappropriate Content
@truten maybe you can search the file with this command "sudo find / -name uninstall.sh"
or you can try to make a new file in the path with "touch uninstall.sh", edit the file with "nano uninstall.sh", and paste below contents to the file by right-click, the content is copied from my uninstall.sh fil:
.
#!/bin/bash
NAME="omada"
DESC="Omada Controller"
DEST_DIR=/opt/tplink
DEST_FOLDER=EAPController
INSTALLDIR=${DEST_DIR}/${DEST_FOLDER}
#INSTALLDIR=$(dirname $(readlink -f $0))
LINK=/etc/init.d/tpeap
LINK_CMD=/usr/bin/tpeap
MAIN_CLASS="com.tp_link.eap.start.EapLinuxMain"
#Define the variable to judge that if
#the execution of uninstall.sh is for upgrading.
UNINSTALL_TYPE=$1
user_confirm() {
if [ "${UNINSTALL_TYPE}" == "upgrade" ]; then
return 0
fi
while true
do
echo -n "${DESC} will be uninstalled from [${INSTALLDIR}] (y/n): "
read input
confirm=`echo $input | tr '[a-z]' '[A-Z]'`
if [ "$confirm" == "Y" -o "$confirm" == "YES" ]; then
return 0
elif [ "$confirm" == "N" -o "$confirm" == "NO" ]; then
return 1
fi
done
}
user_keep_db() {
if [ "${UNINSTALL_TYPE}" == "upgrade" ]; then
return 0
fi
while true
do
echo -n "Do you want to backup database [${INSTALLDIR}/data/db] (y/n): "
read input
confirm=`echo $input | tr '[a-z]' '[A-Z]'`
if [ "$confirm" == "Y" -o "$confirm" == "YES" ]; then
return 0
elif [ "$confirm" == "N" -o "$confirm" == "NO" ]; then
return 1
fi
done
}
# return: 0, exist; 1, not exist;
link_exist() {
if test -x $1; then
if [ ${INSTALLDIR}/bin/control.sh = $(readlink -f $1) ]; then
return 0
fi
fi
return 1
}
# return: 1,running; 0, not running;
is_running() {
[ -z "$(pgrep -f ${MAIN_CLASS})" ] && {
return 0
}
return 1
}
# root permission check
check_perms() {
[ $(id -ru) != 0 ] && { echo "You must be root to uninstall the ${DESC}. Exit." 1>&2; exit 1; }
}
# root permission check
check_perms
# user confirm
if ! user_confirm; then
exit
fi
NEED_KEEP_DB=0
if ! user_keep_db; then
NEED_KEEP_DB=0
else
NEED_KEEP_DB=1
fi
echo "========================"
echo "Uninstallation start ..."
link_exist ${LINK}
exist=$?
count=0
while [ $exist -eq 1 ]
do
count=`expr ${count} + 1`
link_exist ${LINK}${count}
exist=$?
if [ $count -gt 100 ]; then
# not found LINK
break;
fi
done
for i in `seq 1 3` ; do
is_running
[ 0 == $? ] && {
break
}
echo "${DESC} is running, going to stop it."
if [ -x ${INSTALLDIR}/bin/control.sh ]; then
${INSTALLDIR}/bin/control.sh stop
else
echo "Can't stop ${DESC}! You should stop it by yourself before uninstall."
exit
fi
sleep 3
done
# removing
if [ $count -eq 0 ]; then
link_name=${LINK}
link_cmd_name=${LINK_CMD}
else
link_name=${LINK}${count}
link_cmd_name=${LINK_CMD}${count}
fi
update-rc.d $(basename ${link_name}) remove 2>/dev/null
result=$?
if [ $result -ne 0 ]; then
chkconfig --del ${link_name}
chkconfig --del ${link_cmd_name}
fi
rm ${link_name}
rm ${link_cmd_name}
BACKUP_FOLDER=${INSTALLDIR}/../eap_db_backup
DB_FILE_NAME=eap.db.tar.gz
MAP_FILE_NAME=eap.map.tar.gz
if [ $NEED_KEEP_DB == 1 ]; then
mkdir $BACKUP_FOLDER > /dev/null 2>&1
cd ${INSTALLDIR}/data
tar zcvf $DB_FILE_NAME db
cp -f $DB_FILE_NAME $BACKUP_FOLDER/
#backup map
tar zcvf $MAP_FILE_NAME map
cp -f $MAP_FILE_NAME $BACKUP_FOLDER/
fi
rm -rf ${INSTALLDIR}
echo "Uninstall ${DESC} successfully."
- Copy Link
- Report Inappropriate Content
@.-. Hello,
I have marked your reply as solution since it helped me with my issue.
Unfortunately I ended up reinstalling the VM since after the uninstall the omada was giving me multiple errors on java while installing the new version.
It was much quicker to do everything from the scratch but even with the faqs i had problems with the setup.
Specifically this command:
sudo apt-get install -y mongodb-org
It does not work on Ubunut Server 18 LTS. Removing the -y make it works but it skip some required packages and at the end mongo does not work.
The solution is to install it with :
sudo apt-get install mongodb
This will works because, from what i understand, there are two versions of mongodb:this on is the unofficial one maintened by Ubuntu the org one is the official one but wasn't working.
At the end it now works and I was able to import the previus configuration and update the firmware of my two access point.
So problem solved I suppose.
Thanks
- Copy Link
- Report Inappropriate Content
I'm also having the same issue, i.e. missing "uninstall.sh". So I created a new one as suggested above, and it executed successfully:
# /opt/tplink/EAPController# bash uninstall.sh
Omada Controller will be uninstalled from [/opt/tplink/EAPController] (y/n): y
Do you want to backup database [/opt/tplink/EAPController/data/db] (y/n): y
========================
Uninstallation start ...
db/
db/tpeap.0
db/journal/
db/tpeap.1
db/tpeap.ns
map/
Uninstall Omada Controller successfully.
However, when trying to install version 4.2.8, I get the following:
/tmp# dpkg -i omada_v4.2.8_linux_x64.deb dpkg: regarding omada_v4.2.8_linux_x64.deb containing omadac: omadac conflicts with omada omada (version 3.2.10) is present and installed. dpkg: error processing archive omada_v4.2.8_linux_x64.deb (--install): conflicting packages - not installing omadac Errors were encountered while processing: omada_v4.2.8_linux_x64.deb
Any help is much appreciated.
- Copy Link
- Report Inappropriate Content
In case anyone needs, I found a solution that worked for me (ubuntu 16.04):
remove omada package (it will remove dependencies as well, you may also need to run with --purge option):
dpkg -r omada
list the packages (ensure omada package is not there):
dpkg-query -l | less
install the new package:
dpkg -i omada_v4.2.8_linux_x64.deb
install all dependencies:
sudo apt-get -f install
- Copy Link
- Report Inappropriate Content
- Copy Link
- Report Inappropriate Content
Information
Helpful: 0
Views: 4455
Replies: 7
Voters 0
No one has voted for it yet.