summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin 'golodhrim' Scholz2019-07-14 04:43:47 +0200
committerMartin 'golodhrim' Scholz2019-07-14 04:43:47 +0200
commitacf9d559e0ee50ba75378c32e06cade9a4c2dc77 (patch)
treeeb1df32ad7bf0ec8ca7b215587f735ed208b19d8
parentd6f25cd82d3c678c97a9ec9da1b0462342ce2409 (diff)
downloadaur-acf9d559e0ee50ba75378c32e06cade9a4c2dc77.tar.gz
Update config, service and install scripts
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD6
-rw-r--r--trytond.conf149
-rw-r--r--trytond.install10
-rw-r--r--trytond.service2
5 files changed, 133 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 067766878142..268d95ed3df7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -31,8 +31,8 @@ pkgbase = trytond
validpgpkeys = 7C5A4360F6DF81ABA91FD54D6FF50AFE03489130
sha256sums = df86add7e60cb06c7705b8a237b207024f42ae9c0e981357a1dc478b34da7e34
sha256sums = SKIP
- sha256sums = 5fa15f98ccf96359323b6fdb0aa908f5960d238f1ca9343b11abddc8cad497c9
- sha256sums = 6231a678947f08d33159fd6fabfc27708be6b2fabee27adfd249445b7cd121f0
+ sha256sums = b843e9cc60ef01bea8fff6bdcd5cc1bf0838ff04d140caa8fcf146ff87619ae4
+ sha256sums = a5c54c8e0408fd757f7688a784ea0ba713c1f46636b5c67858d3817433151f34
pkgname = trytond
diff --git a/PKGBUILD b/PKGBUILD
index 7d84d308a89f..90c0684d3546 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,8 +26,8 @@ source=("http://downloads.tryton.org/$_pkgdir/$pkgname-$pkgver.tar.gz"
'trytond.service')
sha256sums=('df86add7e60cb06c7705b8a237b207024f42ae9c0e981357a1dc478b34da7e34'
'SKIP'
- '5fa15f98ccf96359323b6fdb0aa908f5960d238f1ca9343b11abddc8cad497c9'
- '6231a678947f08d33159fd6fabfc27708be6b2fabee27adfd249445b7cd121f0')
+ 'b843e9cc60ef01bea8fff6bdcd5cc1bf0838ff04d140caa8fcf146ff87619ae4'
+ 'a5c54c8e0408fd757f7688a784ea0ba713c1f46636b5c67858d3817433151f34')
validpgpkeys=('7C5A4360F6DF81ABA91FD54D6FF50AFE03489130') # Cédric Krier
build() {
@@ -38,6 +38,6 @@ build() {
package() {
cd $srcdir/$pkgname-$pkgver
python setup.py install --root=$pkgdir --optimize=1
- install -D -m640 "$srcdir/trytond.conf" "$pkgdir/etc/trytond.conf"
+ install -D -m640 "$srcdir/trytond.conf" "$pkgdir/etc/tryton/trytond.conf"
install -D -m755 "$srcdir/trytond.service" "$pkgdir/usr/lib/systemd/system/trytond.service"
}
diff --git a/trytond.conf b/trytond.conf
index d38be139d986..1fb84f1bd56f 100644
--- a/trytond.conf
+++ b/trytond.conf
@@ -1,44 +1,141 @@
-# Configuration file for the Tryton server.
+# /etc/tryton/trytond.conf - Configuration file for Tryton Server (trytond)
#
# See the Tryton documentation for a description of the options:
-# http://doc.tryton.org/3.8/trytond/doc/topics/configuration.html
+# https://docs.tryton.org/projects/server/en/latest/topics/configuration.html#topics-configuration
+
+[database]
+# Database related settings
+
+# The URI to connect to the SQL database (following RFC-3986)
+# uri = database://username:password@host:port/
+# (Internal default: sqlite:// (i.e. a local SQLite database))
+#
+# PostgreSQL via Unix domain sockets
+# (e.g. PostgreSQL database running on the same machine (localhost))
+#uri = postgresql://tryton:tryton@/
+#
+#Default setting for a local postgres database
+#uri = postgresql:///
+
+#
+# PostgreSQL via TCP/IP
+# (e.g. connecting to a PostgreSQL database running on a remote machine or
+# by means of md5 authentication. Needs PostgreSQL to be configured to accept
+# those connections (pg_hba.conf).)
+uri = postgresql://tryton:tryton@localhost:5432/
+
+# The path to the directory where the Tryton Server stores files.
+# The server must have write permissions to this directory.
+# (Internal default: /var/lib/trytond)
+path = /var/lib/tryton
+
+# Shall available databases be listed in the client?
+list = True
+
+# The number of retries of the Tryton Server when there are errors
+# in a request to the database
+#retry = 5
+
+# The primary language, that is used to store entries in translatable
+# fields into the database.
+language = en_US
+
+[ssl]
+# SSL settings
+# Activation of SSL for all available protocols.
+# Uncomment the following settings for key and certificate
+# to enable SSL.
+
+# The path to the private key
+#privatekey = /etc/ssl/private/ssl-cert-snakeoil.key
+
+# The path to the certificate
+#certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem
[jsonrpc]
-#listen = localhost:8000
+# Settings for the JSON-RPC network interface
+
+# The IP/host and port number of the interface
+# (Internal default: localhost:8000)
+#
+# Listen on all interfaces (IPv4)
+
+listen = 0.0.0.0:8000
+
+#
+# Listen on all interfaces (IPv4 and IPv6)
+#listen = [::]:8000
+
+# The hostname for this interface
#hostname =
-#data = /var/www/localhost/tryton
+
+# The root path to retrieve data for GET requests
+#data = jsondata
[xmlrpc]
-#listen =
+# Settings for the XML-RPC network interface
+
+# The IP/host and port number of the interface
+#listen = localhost:8069
[webdav]
-#listen =
+# Settings for the WebDAV network interface
-[database]
-#uri = sqlite://
-#path = /var/lib/trytond/
-#list = True
-#retry = 5
-#language = en_US
+# The IP/host and port number of the interface
+#listen = localhost:8080
+listen = 0.0.0.0:8080
-[cache]
-#model = 200
-#record = 2000
-#field = 100
+[session]
+# Session settings
-[table]
+# The time (in seconds) until an inactive session expires
+timeout = 3600
-[ssl]
-#privatekey =
-#certificate =
+# The server administration password used by the client for
+# the execution of database management tasks. It is encrypted
+# using using the Unix crypt(3) routine. A password can be
+# generated using the following command line (on one line):
+# $ python -c 'import getpass,crypt,random,string; \
+# print crypt.crypt(getpass.getpass(), \
+# "".join(random.sample(string.ascii_letters + string.digits, 8)))'
+# Example password with 'admin'
+#super_pwd = jkUbZGvFNeugk
[email]
-#uri =
-#from =
+# Mail settings
-[session]
-#timeout =
-#super_pwd =
+# The URI to connect to the SMTP server.
+# Available protocols are:
+# - smtp: simple SMTP
+# - smtp+tls: SMTP with STARTTLS
+# - smtps: SMTP with SSL
+#uri = smtp://localhost:25
+uri = smtp://localhost:25
+
+# The From address used by the Tryton Server to send emails.
+from = tryton@<your-domain.tld>
[report]
-#unoconv =
+# Report settings
+
+# Unoconv parameters for connection to the unoconv service.
+#unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext
+
+# Module settings
+#
+# Some modules are reading configuration parameters from this
+# configuration file. These settings only apply when those modules
+# are installed.
+#
+#[ldap_authentication]
+# The URI to connect to the LDAP server.
+#uri = ldap://host:port/dn?attributes?scope?filter?extensions
+# A basic default URL could look like
+#uri = ldap://localhost:389/
+
+[web]
+# Path for the web-frontend
+#root = /usr/lib/node-modules/tryton-sao
+#listen = 0.0.0.0:8000
+#root = /home/tryton/sao
+
diff --git a/trytond.install b/trytond.install
index 453bcac1dcc2..d720a42d8378 100644
--- a/trytond.install
+++ b/trytond.install
@@ -1,14 +1,12 @@
post_install() {
echo
- echo "Adding tryton group... "
- groupadd tryton
- echo "Adding tryton user... "
- useradd -c "Tryton Server Daemon" -g tryton -s /bin/false tryton
+ echo "Adding tryton user and group... "
+ useradd -r -c "Tryton Server Daemon" -U -s /bin/false tryton
echo
echo "Note:"
- echo "- Tryton modules can be installed using pip2, e.g. 'pip2 install trytond-party'."
- echo "- Configure Tryton using the config file /etc/trytond.conf."
+ echo "- Tryton modules can be installed using pip, e.g. 'pip install trytond-party'."
+ echo "- Configure Tryton using the config file /etc/tryton/trytond.conf."
echo "- See the Tryton documentation at http://doc.tryton.org for more information."
echo
}
diff --git a/trytond.service b/trytond.service
index 853d45fcf339..7902d82e870d 100644
--- a/trytond.service
+++ b/trytond.service
@@ -4,7 +4,7 @@ Description=Tryton Server Daemon
[Service]
Type=simple
User=tryton
-ExecStart=/usr/bin/trytond -c /etc/trytond.conf
+ExecStart=/usr/bin/trytond -c /etc/tryton/trytond.conf
[Install]
WantedBy=multi-user.target