1405: Fix roundcube permissions, tail correct log r=mergify[bot] a=micw

## What type of PR?

bug-fix

## What does this PR do?

Set roundcube permissions after the database is created. Tail correct logfile.

## Prerequistes
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/guide.html#changelog) entry file.

Minor fix only.

Co-authored-by: Michael Wyraz <michael@wyraz.de>
master
bors[bot] 5 years ago committed by GitHub
commit f4944695f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,10 +35,10 @@ else:
conf.jinja("/php.ini", os.environ, "/usr/local/etc/php/conf.d/roundcube.ini") conf.jinja("/php.ini", os.environ, "/usr/local/etc/php/conf.d/roundcube.ini")
# Fix some permissions # Create dirs, setup permissions
os.system("mkdir -p /data/gpg /var/www/html/logs") os.system("mkdir -p /data/gpg /var/www/html/logs")
os.system("touch /var/www/html/logs/errors") os.system("touch /var/www/html/logs/errors.log")
os.system("chown -R www-data:www-data /data /var/www/html/logs") os.system("chown -R www-data:www-data /var/www/html/logs")
try: try:
print("Initializing database") print("Initializing database")
@ -57,8 +57,11 @@ try:
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
quit(1) quit(1)
# Setup database permissions
os.system("chown -R www-data:www-data /data")
# Tail roundcube logs # Tail roundcube logs
subprocess.Popen(["tail","-f","-n","0","/var/www/html/logs/errors"]) subprocess.Popen(["tail","-f","-n","0","/var/www/html/logs/errors.log"])
# Run apache # Run apache
os.execv("/usr/local/bin/apache2-foreground", ["apache2-foreground"]) os.execv("/usr/local/bin/apache2-foreground", ["apache2-foreground"])

Loading…
Cancel
Save