Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Change install path
Browse files Browse the repository at this point in the history
  • Loading branch information
satouriko committed Jan 30, 2017
1 parent 6e5e656 commit b37df95
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@ open terminal and run

After running the installer, you may either start from the "Application Menu", or run by command `ipgw`. <br>
Use `ipgw --help` to get more information of usage. <br>

**For version v2.2 and later**

The program will be installed to `/opt/2645/neuipgw/` <br>
You may change the configuration of the installed program by editing `/etc/neuipgw/user.cfg`

**For version v2.1 and before**

The program will be installed to `/usr/local/neuipgw/` <br>
You may change the configuration of the installed program by editing `/usr/local/neuipgw/user.cfg`
The configuration file will be stored at `/usr/local/neuipgw/user.cfg`

**If you prefer not to install it,**

Expand Down
20 changes: 11 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ read repassword
done
stty echo

mkdir /usr/local/neuipgw
cp ./ipgw.sh /usr/local/neuipgw/ipgw
chmod 755 /usr/local/neuipgw/ipgw
mkdir /opt/2645
mkdir /opt/2645/neuipgw
mkdir /etc/neuipgw
cp ./ipgw.sh /opt/2645/neuipgw/ipgw
chmod 755 /opt/2645/neuipgw/ipgw
#cp ./user.cfg /usr/local/neuipgw/user.cfg
echo "#!/bin/bash" > /usr/local/neuipgw/user.cfg
echo "USER_NAME=$username" >> /usr/local/neuipgw/user.cfg
echo "USER_PASS=$password" >> /usr/local/neuipgw/user.cfg
cp ./ipgw.png /usr/local/neuipgw/ipgw.png
echo "#!/bin/bash" > /etc/neuipgw/user.cfg
echo "USER_NAME=$username" >> /etc/neuipgw/user.cfg
echo "USER_PASS=$password" >> /etc/neuipgw/user.cfg
cp ./ipgw.png /opt/2645/neuipgw/ipgw.png
rm -f /usr/bin/ipgw
ln -s /usr/local/neuipgw/ipgw /usr/bin/ipgw
ln -s /opt/2645/neuipgw/ipgw /usr/bin/ipgw

echo [Desktop Entry]>/usr/share/applications/neuipgw.desktop
echo Name=NEU-IPGW>>/usr/share/applications/neuipgw.desktop
echo Comment=Speedier Internet Access>>/usr/share/applications/neuipgw.desktop
echo Exec=/usr/bin/ipgw>>/usr/share/applications/neuipgw.desktop
echo Icon=/usr/local/neuipgw/ipgw.png>>/usr/share/applications/neuipgw.desktop
echo Icon=/opt/2645/neuipgw/ipgw.png>>/usr/share/applications/neuipgw.desktop
echo Terminal=true>>/usr/share/applications/neuipgw.desktop
echo Type=Application>>/usr/share/applications/neuipgw.desktop
echo Categories=Network>>/usr/share/applications/neuipgw.desktop
Expand Down
6 changes: 5 additions & 1 deletion ipgw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a syml
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

source $DIR/user.cfg
if [ -f "$DIR/user.cfg" ]; then
source $DIR/user.cfg
else
source /etc/neuipgw/user.cfg
fi

temp=$(getopt -q -o qcdfmu:p:h --long connect,disconnect,force,mobile,query,username:,password:,help -- "$@")
if [ $? != 0 ]
Expand Down

0 comments on commit b37df95

Please sign in to comment.