Skip to content

Commit

Permalink
[+] Added Docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitospush committed Feb 8, 2021
0 parents commit b1b9923
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions huawei.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TargetVendor=0x12d1
TargetProduct=0x1f01
DefaultVendor=0x12d1
DefaultProduct=0x1f01

# switch to 12d1:14dc (default HiLink CDC-Ether mode)
MessageContent="55534243123456780000000000000a11062000000000000100000000000000"
6 changes: 6 additions & 0 deletions install-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sudo apt-get install apt-transport-https ca-certificates software-properties-common -y
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker pi
echo "deb https://download.docker.com/linux/raspbian/ stretch stable" >> /etc/apt/sources.list
sudo apt-get update --assume-yes
sudo apt-get upgrade --assume-yes
22 changes: 22 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

echo "Input your smsgateway24 login"
read LOGIN
echo "Input your smsgateway24 password"
read -s PASS


curl -fsSL https://get.docker.com -o get-docker.sh
apt list --installed |grep docker-ce/ || bash ./install-docker.sh
apt list --installed |grep usb-modeswitch/ || apt-get install --assume-yes usb-modeswitch
systemctl enable docker
systemctl start docker

docker container stop smsgw24
docker container rm smsgw24
docker run -d --restart unless-stopped --env LOGIN=${LOGIN} --env PASS=${PASS} --name smsgw24 filimon43g/smsgateway24:huawei-1.0

sed -i "s/DisableSwitching=10/DisableSwitching=0/g" /etc/usb_modeswitch.conf
cp huawei.cfg /etc/usb_modeswitch.d/huawei.cfg

usb_modeswitch -c /etc/usb_modeswitch.d/huawei.cfg

0 comments on commit b1b9923

Please sign in to comment.