if filesystem permissions on the directory the sqlite database database file is in are such that the app cannot list or create files, sqlite gives a vague error: ``` sqlite3.OperationalError: unable to open database file ``` whereas python's open() will give a better hint ("permission denied"). So, we try opening the database file with python first. also, add chmods to the startup scripts to avoid this issue in the future
9 lines
104 B
Bash
9 lines
104 B
Bash
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
chmod 755 /db/.
|
|
chown -R app:app /db
|
|
|
|
exec sudo --preserve-env -Hu app pysonicd $@
|