mirror of
https://github.com/YunoHost-Apps/libreerp_ynh.git
synced 2024-09-03 19:36:13 +02:00
Simpler install
This commit is contained in:
parent
7368af8706
commit
dd5aef8ec2
2 changed files with 11 additions and 52 deletions
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
Description=Advanced OpenSource ERP and CRM server
|
||||
Requires=postgresql.service
|
||||
After=postgresql.service
|
||||
[Install]
|
||||
Alias=odoo.service
|
||||
[Service]
|
||||
Type=simple
|
||||
PermissionsStartOnly=true
|
||||
EnvironmentFile=-/etc/odoo-server.conf
|
||||
User=odoo
|
||||
Group=odoo
|
||||
SyslogIdentifier=odoo-server
|
||||
PIDFile=/run/odoo/odoo-server.pid
|
||||
ExecStartPre=/usr/bin/install -d -m755 -o odoo -g odoo /run/odoo
|
||||
ExecStart=/usr/local/bin/odoo-server -c /etc/odoo-server.conf --pid=/run/odoo/odoo-server.pid --syslog $OPENERP_ARGS
|
||||
ExecStop=/bin/kill $MAINPID
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -23,45 +23,23 @@ domain=${domain%/}
|
|||
sudo yunohost app setting $app domain -v $domain
|
||||
|
||||
# Install Odoo
|
||||
# Install postgresql and create user
|
||||
sudo apt-get install postgresql -y
|
||||
sudo su - postgres -c "createuser -s odoo" 2> /dev/null || true
|
||||
|
||||
# Install Odoo dependencies
|
||||
sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests git-core python-passlib -y
|
||||
sudo pip install gdata
|
||||
|
||||
# Install wkhtopdf to print PDF reports
|
||||
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
|
||||
sudo dpkg -i wkhtmltox-0.12.2.1_linux-jessie-amd64.deb
|
||||
sudo apt-get install -y xfonts-75dpi
|
||||
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
|
||||
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin
|
||||
|
||||
# Create odoo user
|
||||
sudo adduser --system --quiet --shell=/bin/bash --home=/home/odoo --gecos 'ODOO' --group odoo
|
||||
# Prepare installation
|
||||
sudo apt-get -y install curl
|
||||
|
||||
# Install Odoo
|
||||
sudo git clone --branch $odoo_version https://www.github.com/odoo/odoo /opt/odoo/
|
||||
sudo chown -R odoo:odoo /opt/odoo
|
||||
sudo curl -sS https://nightly.odoo.com/odoo.key | sudo apt-key add -
|
||||
sudo sh -c 'echo "deb http://nightly.odoo.com/$odoo_version/nightly/deb/ ./" > /etc/apt/sources.list.d/odoo.list'
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install wkhtmltopdf
|
||||
sudo apt-get -y install odoo
|
||||
|
||||
# Create log file
|
||||
sudo mkdir /var/log/odoo
|
||||
sudo chown -R odoo:odoo /var/log/odoo
|
||||
|
||||
# Create conf file
|
||||
# Copy conf file
|
||||
sudo sed -i "s@ADMIN_PASSWORD@$admin_password@g" ../conf/odoo-server.conf
|
||||
sudo cp ../conf/odoo-server.conf /etc/odoo-server.conf
|
||||
sudo chown odoo:odoo /etc/odoo-server.conf
|
||||
|
||||
# Systemd and services
|
||||
# if [ -d /run/systemd/system ]; then
|
||||
# sudo systemctl enable postgresql.service
|
||||
# sudo cp ../conf/systemd.service /etc/systemd/system/odoo.service
|
||||
# sudo systemctl enable odoo.service
|
||||
# fi
|
||||
# sudo yunohost service add postgresql
|
||||
# sudo yunohost service add odoo
|
||||
# Add services
|
||||
sudo yunohost service add postgresql
|
||||
sudo yunohost service add odoo
|
||||
|
||||
# Configure Nginx and reload
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
|
Loading…
Reference in a new issue