mirror of
https://github.com/sixfab/Sixfab_PPP_Installer
synced 2024-11-24 20:04:54 +00:00
changed working directories
This commit is contained in:
parent
105e9f8f68
commit
b1a6f6848c
@ -1,11 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
REPO=revision
|
||||
SIXFAB_PATH="/opt/sixfab"
|
||||
PPP_PATH="/opt/sixfab/ppp_connection_manager"
|
||||
|
||||
YELLOW='\033[1;33m'
|
||||
RED='\033[0;31m'
|
||||
BLUE='\033[1;34m'
|
||||
SET='\033[0m'
|
||||
|
||||
REPO=revision
|
||||
function debug()
|
||||
{
|
||||
echo $(date "+%Y/%m/%d - %H:%M:%S :") "$1"
|
||||
}
|
||||
|
||||
function colored_echo
|
||||
{
|
||||
@ -14,6 +21,23 @@ function colored_echo
|
||||
}
|
||||
|
||||
|
||||
# Check Sixfab path
|
||||
if [[ -e $SIXFAB_PATH ]]; then
|
||||
debug "Path already exist!"
|
||||
else
|
||||
sudo mkdir $SIXFAB_PATH
|
||||
debug "Sixfab path is created."
|
||||
fi
|
||||
|
||||
# Check PPP path
|
||||
if [[ -e $PPP_PATH ]]; then
|
||||
debug "Path already exist!"
|
||||
else
|
||||
sudo mkdir $PPP_PATH
|
||||
debug "PPP path is created."
|
||||
fi
|
||||
|
||||
|
||||
colored_echo "Please choose your Sixfab Shield/HAT:"
|
||||
colored_echo "1: GSM/GPRS Shield"
|
||||
colored_echo "2: 3G, 4G/LTE Base Shield"
|
||||
@ -119,6 +143,9 @@ do
|
||||
[Yy]* ) colored_echo "Downloading setup file..."
|
||||
|
||||
wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_service -O reconnect.service
|
||||
wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/functions.sh
|
||||
wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/configs.sh
|
||||
|
||||
|
||||
if [ $shield_hat -eq 1 ]; then
|
||||
|
||||
@ -146,7 +173,9 @@ do
|
||||
|
||||
fi
|
||||
|
||||
mv reconnect.sh /usr/src/
|
||||
mv reconnect.sh $PPP_PATH
|
||||
mv functions.sh $PPP_PATH
|
||||
mv configs.sh $PPP_PATH
|
||||
mv reconnect.service /etc/systemd/system/
|
||||
|
||||
systemctl daemon-reload
|
||||
|
@ -3,8 +3,8 @@ Description=PPP Auto Connection
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh /usr/src/reconnect.sh
|
||||
WorkingDirectory=/usr/src/
|
||||
ExecStart=/bin/bash reconnect.sh
|
||||
WorkingDirectory=/opt/sixfab/ppp_connection_manager
|
||||
StandardOutput=inherit
|
||||
StandardError=inherit
|
||||
Restart=always
|
||||
|
Loading…
Reference in New Issue
Block a user