forked from SUNET/soc-ops
Bugfix
This commit is contained in:
parent
aef2b3d9ad
commit
c45aa4aafd
3 changed files with 37 additions and 5 deletions
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Script to install IntelMQ
|
||||
#
|
||||
|
||||
if [ "x$(whoami)" != "xintelmq" ]; then
|
||||
echo "Exectuing as wrong user."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if ! test -f /opt/intelmq/venv/bin/activate; then
|
||||
echo "Issues with venv."
|
||||
exit -1
|
||||
else
|
||||
source /opt/intelmq/venv/bin/activate
|
||||
fi
|
||||
|
||||
PY_INTELMQ='intelmq intelmq-api intelmqmail intelmq-manager'
|
||||
PY_CERTBUND_CONTACT='intelmq-certbund-contact intelmq-fody-backend'
|
||||
|
||||
|
||||
pip3 install $PY_INTELMQ
|
||||
pip3 install $PY_CERTBUND_CONTACT
|
||||
# Due to Certbund contact overwrite files for some reason, reinstall intelmq
|
||||
pip3 install --force-reinstall intelmq
|
||||
|
||||
touch /opt/intelmq/.installed
|
Binary file not shown.
|
@ -11,7 +11,7 @@ class soc::intelmq(
|
|||
groups => 'www-data',
|
||||
home => '/opt/intelmq',
|
||||
managehome => true,
|
||||
provider => 'useradd',
|
||||
shell => '/bin/bash',
|
||||
}
|
||||
|
||||
file { '/etc/intelmq':
|
||||
|
@ -25,7 +25,7 @@ class soc::intelmq(
|
|||
# content => template('soc/sso/apache-groups.txt.erb')
|
||||
# }
|
||||
|
||||
package { ['apache2', 'libapache2-mod-wsgi-py3', 'postgresql', 'python3-venv', 'python3-pip', 'python3-gpg']:
|
||||
package { ['apache2', 'libapache2-mod-wsgi-py3', 'postgresql', 'python3-venv', 'python3-pip', 'python3-gpg', 'python3-psycopg2']:
|
||||
ensure => 'latest',
|
||||
}
|
||||
|
||||
|
@ -33,8 +33,13 @@ class soc::intelmq(
|
|||
creates => '/opt/intelmq/venv',
|
||||
}
|
||||
|
||||
# Install intelmq and all most stuff around it.
|
||||
exec { 'sudo -u intelmq /opt/intelmq/venv/bin/pip3 install intelmq intelmq-api intelmq-certbund-contact intelmq-certbund-contact-api intelmq-checkticket-api intelmq-events-api intelmq-fody-backend intelmq-manager intelmq-session intelmq-tickets-api intelmqmail':
|
||||
creates => '/opt/intelmq/etc',
|
||||
file { '/opt/intelmq/install-intelmq.sh':
|
||||
ensure => file,
|
||||
content => file('soc/intelmq/install-intelmq.sh'),
|
||||
mode => 0555,
|
||||
}
|
||||
|
||||
exec { 'sudo -u intelmq /opt/install-intelmq.sh':
|
||||
creates => '/opt/intelmq/.installed'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue