-
-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #935 from jookies/0.10
0.10.6
- Loading branch information
Showing
26 changed files
with
270 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,4 +53,8 @@ twistd.log | |
# Celery | ||
celerybeat-schedule.db | ||
|
||
# Packaging | ||
*.deb | ||
*.rpm | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
MAJOR = 0 | ||
MINOR = 10 | ||
PATCH = 5 | ||
PATCH = 6 | ||
META = '' | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python3 | ||
|
||
import os | ||
import signal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python3 | ||
|
||
import os | ||
import signal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python3 | ||
|
||
import os | ||
import signal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python3 | ||
|
||
import os | ||
import signal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
JASMIN_USER="jasmin" | ||
JASMIN_GROUP="jasmin" | ||
|
||
PACKAGE_NAME="jasmin-sms-gateway" | ||
PYPI_NAME="jasmin" | ||
|
||
# Get installed package version and install the related pypi package(s) | ||
if [ "$(grep -Ei 'debian|buntu' /etc/*release)" ]; then | ||
PACKAGE_VERSION=$(dpkg -s "$PACKAGE_NAME"|grep ^Version:|awk '{print $2}') | ||
pip3 install "$PYPI_NAME"=="$PACKAGE_VERSION" | ||
elif [ "$(grep -Ei 'centos|rhel|fedora' /etc/*release)" ]; then | ||
PACKAGE_VERSION=$(rpm -qi "$PACKAGE_NAME"|grep ^Version|awk {'print $3'}) | ||
pip3 install "$PYPI_NAME"=="$PACKAGE_VERSION" | ||
else | ||
echo "ERROR: Unsupported OS for this package." | ||
exit 1 | ||
fi | ||
|
||
# Provision user/group | ||
getent group $JASMIN_GROUP || groupadd -r "$JASMIN_GROUP" | ||
grep -q "^${JASMIN_USER}:" /etc/passwd || useradd -r -g $JASMIN_GROUP \ | ||
-d /usr/share/jasmin -s /sbin/nologin \ | ||
-c "Jasmin SMS Gateway user" $JASMIN_USER | ||
|
||
# Change owner of required folders | ||
chown -R "$JASMIN_USER:$JASMIN_GROUP" /etc/jasmin/store/ | ||
chown -R "$JASMIN_USER:$JASMIN_GROUP" /var/log/jasmin | ||
|
||
if [ "$1" = configure ]; then | ||
# Enable jasmind service | ||
/bin/systemctl daemon-reload | ||
/bin/systemctl enable jasmind | ||
fi | ||
|
||
# python3-falcon package is not available in centos/rhel 8 | ||
# this is a workaround | ||
if [ "$(grep -Ei 'centos|rhel|fedora' /etc/*release)" ]; then | ||
pip3 install falcon==2.0.0 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
PYPI_NAME="jasmin" | ||
|
||
pip3 uninstall -y "$PYPI_NAME" | ||
|
||
# Stop and disable jasmind service | ||
/bin/systemctl stop jasmind | ||
/bin/systemctl disable jasmind | ||
/bin/systemctl daemon-reload | ||
|
||
# python3-falcon package is not available in centos/rhel 8 | ||
# this is a workaround | ||
if [ "$(grep -Ei 'centos|rhel|fedora' /etc/*release)" ]; then | ||
pip3 uninstall -y falcon==2.0.0 | ||
fi |
Oops, something went wrong.