|
3 | 3 |
|
4 | 4 |
|
5 | 5 | #Ensure LRR folder is writable |
6 | | -chown root /home/dezhao/lanraragi |
7 | | -chmod u+rwx /home/dezhao/lanraragi |
| 6 | +chown root /root/lanraragi |
| 7 | +chmod u+rwx /root/lanraragi |
8 | 8 |
|
9 | 9 | #Crash with an error if content folder doesn't exist |
10 | | -if [ ! -d "/home/dezhao/lanraragi/content" ]; then |
| 10 | +if [ ! -d "/root/lanraragi/content" ]; then |
11 | 11 | echo "Content folder doesn't exist! Please ensure your Docker mappings are correct." |
12 | 12 | exit 1 |
13 | 13 | fi |
14 | 14 |
|
15 | 15 | #Ensure database is writable |
16 | | -chown -R root /home/dezhao/lanraragi/database |
17 | | -chmod -R 777 /home/dezhao/lanraragi/database |
| 16 | +chown -R root /root/lanraragi/database |
| 17 | +chmod -R 777 /root/lanraragi/database |
18 | 18 |
|
19 | 19 | #Ensure thumbnail folder is writable |
20 | | -chmod -R 744 /home/dezhao/lanraragi/content/thumb |
21 | | -find /home/dezhao/lanraragi/content/thumb -type f -exec chmod u+rw {} \; |
22 | | -find /home/dezhao/lanraragi/content/thumb -type d -exec chmod u+rwx {} \; |
| 20 | +chmod -R 744 /root/lanraragi/content/thumb |
| 21 | +find /root/lanraragi/content/thumb -type f -exec chmod u+rw {} \; |
| 22 | +find /root/lanraragi/content/thumb -type d -exec chmod u+rwx {} \; |
23 | 23 |
|
24 | 24 | #Ensure log folder is writable |
25 | | -mkdir /home/dezhao/lanraragi/log |
26 | | -chown -R root /home/dezhao/lanraragi/log |
27 | | -chmod u+rwx /home/dezhao/lanraragi/log |
| 25 | +mkdir /root/lanraragi/log |
| 26 | +chown -R root /root/lanraragi/log |
| 27 | +chmod u+rwx /root/lanraragi/log |
28 | 28 |
|
29 | 29 | #Ensure temp folder is writable |
30 | | -mkdir /home/dezhao/lanraragi/public/temp |
31 | | -chown -R root /home/dezhao/lanraragi/public/temp |
32 | | -chmod u+rwx /home/dezhao/lanraragi/public/temp |
| 30 | +mkdir /root/lanraragi/public/temp |
| 31 | +chown -R root /root/lanraragi/public/temp |
| 32 | +chmod u+rwx /root/lanraragi/public/temp |
33 | 33 |
|
34 | 34 | #Remove mojo, minion and shinobu pid files |
35 | | -rm /home/dezhao/lanraragi/public/temp/server.pid |
36 | | -rm /home/dezhao/lanraragi/public/temp/shinobu.pid |
37 | | -rm /home/dezhao/lanraragi/public/temp/minion.pid |
| 35 | +rm /root/lanraragi/public/temp/server.pid |
| 36 | +rm /root/lanraragi/public/temp/shinobu.pid |
| 37 | +rm /root/lanraragi/public/temp/minion.pid |
38 | 38 |
|
39 | 39 | # https://redis.io/topics/faq#background-saving-fails-with-a-fork-error-under-linux-even-if-i-have-a-lot-of-free-ram |
40 | 40 | OVERCOMMIT=$(cat /proc/sys/vm/overcommit_memory) |
|
0 commit comments