Skip to content

Commit

Permalink
reinstall process improved
Browse files Browse the repository at this point in the history
Now we save a copy of config-file in home folder in case Webinoly is reinstalled.
  • Loading branch information
QROkes committed Jan 17, 2018
1 parent a54d357 commit 9d97bf9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions plugins/webinoly
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ elif [ "$opt" == "-uninstall" ]; then
sudo apt-get -y -qq autoremove > /dev/null
conf_write pre-packs purged
fi
sudo mv /opt/webinoly/webinoly.conf $HOME/.webinoly-conf-restore_dont-remove
sudo rm -rf /opt/webinoly
sudo rm /usr/bin/webinoly
sudo rm /usr/bin/stack
Expand Down
18 changes: 11 additions & 7 deletions weby
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Webinoly script.
# This script is designed to install latest Webinoly.
webyversion="1.2.2-beta"
webyversion="1.2.2"


# Check OS support
Expand Down Expand Up @@ -64,15 +64,19 @@ sudo mv /opt/webinoly/plugins/* /usr/bin/

source /opt/webinoly/lib/install

# Save Tools Port after library is available.
if [[ -z "$2" ]]; then
portools="22222"
else
portools="$2"
# Check for uninstalled Webinoly conf file
if [[ -a $HOME/.webinoly-conf-restore_dont-remove ]]; then
sudo mv $HOME/.webinoly-conf-restore_dont-remove /opt/webinoly/webinoly.conf
fi
if [[ -a /opt/webinoly/webinoly.conf ]]; then

# Save Tools Port after library is available.
if [[ -a /opt/webinoly/webinoly.conf && -n $(conf_read tools-port) ]]; then
echo "${gre}Webinoly Configuration file was found, so we will use it!${end}"
else
portools="22222"
if [[ -n "$2" ]]; then
portools="$2"
fi
tools_port $portools
fi

Expand Down

0 comments on commit 9d97bf9

Please sign in to comment.