Skip to content

Commit f6b0cdc

Browse files
committed
Fix kosync_available
Different chmod fix
1 parent 1339573 commit f6b0cdc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

root/app/calibre-web/cps/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def main():
6262
try:
6363
from .kosync import kosync, populate_document_hashes
6464
populate_document_hashes()
65+
kosync_available = True
6566
except ImportError as e:
6667
# Debugging for xytronix
6768
print("KOSync import error:",e)

scripts/setup-cwa.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ make_dirs () {
66
chown -R abc:abc /app/calibre-web-automated/metadata_change_logs
77
mkdir /app/calibre-web-automated/metadata_temp
88
chown -R abc:abc /app/calibre-web-automated/metadata_temp
9-
sudo -S -u abc mkdir /cwa-book-ingest
10-
chown abc:abc /cwa-book-ingest
11-
sudo -S -u abc mkdir /calibre-library
12-
chown -R abc:abc /calibre-library
9+
mkdir -p /cwa-book-ingest
10+
if [ $(stat -c '%U:%G' /cwa-book-ingest) != "abc:abc" ]
11+
chown abc:abc /cwa-book-ingest
12+
mkdir -p /calibre-library
13+
if [ $(stat -c '%U:%G' /calibre-library) != "abc:abc" ]
14+
chown -R abc:abc /calibre-library
1315
}
1416

1517
# Change ownership & permissions as required

0 commit comments

Comments
 (0)