-
Notifications
You must be signed in to change notification settings - Fork 5
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 #20 from VultureProject/dev
Release 1.78
- Loading branch information
Showing
9 changed files
with
147 additions
and
7 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
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
51 changes: 51 additions & 0 deletions
51
vulture_toolkit/update_api/update_scripts/GUI-1.78/0_reload_haproy_certs.py
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,51 @@ | ||
#!/home/vlt-gui/env/bin/python | ||
# coding:utf-8 | ||
|
||
"""This file is part of Vulture 3. | ||
Vulture 3 is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Vulture 3 is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with Vulture 3. If not, see http://www.gnu.org/licenses/. | ||
""" | ||
__author__ = "Kevin Guillemot" | ||
__credits__ = [] | ||
__license__ = "GPLv3" | ||
__version__ = "3.0.0" | ||
__maintainer__ = "Vulture Project" | ||
__email__ = "[email protected]" | ||
__doc__ = """This migration script rewrite HAProxy certificates on disk """ | ||
|
||
import os | ||
import sys | ||
|
||
sys.path.append('/home/vlt-gui/vulture') | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", 'vulture.settings') | ||
|
||
import django | ||
django.setup() | ||
|
||
from gui.models.network_settings import Loadbalancer | ||
from gui.models.ssl_certificate import SSLCertificate | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
# If HAProxy used | ||
if Loadbalancer.objects.count() == 0: | ||
print("No load-balancer configured.") | ||
sys.exit(0) | ||
|
||
for cert in SSLCertificate.objects(): | ||
cert.write_certificate() | ||
print("Cert {} reloaded".format(cert.name)) | ||
|
||
print("Certificates reloaded") |
15 changes: 15 additions & 0 deletions
15
vulture_toolkit/update_api/update_scripts/GUI-1.78/1_maj_haproxy.sh
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,15 @@ | ||
#!/bin/sh | ||
# | ||
# This migration script install newest Vulture-LIBS package | ||
# | ||
# | ||
|
||
. /etc/rc.conf | ||
|
||
if [ "$http_proxy" != "" ] | ||
then | ||
export https_proxy="http://$http_proxy" | ||
export http_proxy="http://$http_proxy" | ||
fi | ||
|
||
/usr/sbin/pkg upgrade -y haproxy || echo "[!] Failed to upgrade HAProxy - Please do this manually using 'pkg upgrade -y haproxy'" |
22 changes: 22 additions & 0 deletions
22
vulture_toolkit/update_api/update_scripts/GUI-1.78/fix_mongodb_crontab.sh
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,22 @@ | ||
#!/bin/sh | ||
# | ||
# This migration script install newest Vulture-LIBS package | ||
# | ||
# | ||
|
||
. /etc/rc.conf | ||
|
||
cat - << EOF > /etc/rc.conf.d/mongod | ||
mongod_poststart() | ||
{ | ||
if [ -f \${pidfile} ]; then | ||
(chgrp vlt-sys \${pidfile} && chmod g+r \${pidfile}) || return 1 | ||
fi | ||
return 0 | ||
} | ||
start_postcmd="mongod_poststart" | ||
EOF | ||
|
||
echo "[+] Restarting Mongodb to take changes ..." | ||
/usr/sbin/service mongod restart | ||
echo "[*] Done" |
37 changes: 37 additions & 0 deletions
37
vulture_toolkit/update_api/update_scripts/GUI-1.78/maj_vulture-LIBS.sh
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,37 @@ | ||
#!/bin/sh | ||
# | ||
# This migration script install newest Vulture-LIBS package | ||
# | ||
# | ||
|
||
. /etc/rc.conf | ||
|
||
if [ "$http_proxy" != "" ] | ||
then | ||
export https_proxy="http://$http_proxy" | ||
export http_proxy="http://$http_proxy" | ||
fi | ||
|
||
cd /tmp | ||
|
||
/bin/echo "[+] Updating Vulture-LIBS from branch \"$1\"..." | ||
/bin/rm -f /tmp/Vulture-LIBS.tar.gz | ||
|
||
bsd_version=$(/usr/bin/uname -r | /usr/bin/cut -d '-' -f 1) | ||
url="https://download.vultureproject.org/v3/$bsd_version$1/Vulture-LIBS.tar.gz" | ||
|
||
/bin/echo -n "[+] Downloading from '$url' ..." | ||
/usr/local/bin/wget --no-check-certificate $url >>/tmp/installation.log 2>&1 | ||
/bin/echo "DONE" | ||
|
||
cd /home/vlt-gui | ||
/bin/rm -rf ./env | ||
/usr/bin/tar xf /tmp/Vulture-LIBS.tar.gz | ||
/usr/sbin/chown -R vlt-gui:vlt-gui /home/vlt-gui/ | ||
|
||
/bin/echo -n "[+] Installing Vulture libraries ..." | ||
/bin/sh "/home/vlt-gui/lib-$bsd_version/install.sh" | ||
/bin/echo "OK" | ||
|
||
/bin/echo "[*] Update of Vulture-LIBS ended" | ||
|