summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-24 18:13:53 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-24 18:13:53 +0200
commite4bdbca5ce128a14edc087522eac5931774c58a6 (patch)
tree59dd15bfbf3c33e155216721dd5f220eb098f933
parent8a7157fb9e39f59edb93ec81be5bdf36163a68ab (diff)
downloadIshtar-e4bdbca5ce128a14edc087522eac5931774c58a6.tar.bz2
Ishtar-e4bdbca5ce128a14edc087522eac5931774c58a6.zip
Install a daily cron for media permission
-rw-r--r--INSTALL.md2
-rw-r--r--install/ishtar-cron-daily8
-rwxr-xr-xinstall/ishtar-install9
3 files changed, 18 insertions, 1 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 459f1e330..7edfe8ff4 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -4,7 +4,7 @@ Install
Install from Git
----------------
-This procedure only works for Debian Jessie/Stretch for now.
+This procedure only works for Debian Stretch for now.
If you know bash and your distribution the script should be easy to adapt (contributions are welcomed!).
```
diff --git a/install/ishtar-cron-daily b/install/ishtar-cron-daily
new file mode 100644
index 000000000..5629a7071
--- /dev/null
+++ b/install/ishtar-cron-daily
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+ISHTAR_PATH=#ISHTAR_PATH#
+WWW_USER=www-data
+WWW_GROUP=www-data
+
+find $ISHTAR_PATH -type d -name "media" -exec chown -R $WWW_USER:$WWW_GROUP {} \;
+find $ISHTAR_PATH -type d -name "CACHE" -exec chown -R $WWW_USER:$WWW_GROUP {} \;
diff --git a/install/ishtar-install b/install/ishtar-install
index f9c841cb6..2885739a6 100755
--- a/install/ishtar-install
+++ b/install/ishtar-install
@@ -294,6 +294,15 @@ EOF
exit 1
fi
+ echo ""
+ cecho y "Install cron script"
+ echo ""
+
+ sed -s "s|#ISHTAR_PATH#|$full_install_path|g;" \
+ "install/ishtar-cron-daily" > \
+ "/etc/cron.daily/ishtar"
+ chmod u+x "/etc/cron.daily/ishtar"
+
echo "-------------------------------------------------------------------------------";
cecho y "Update debian packages cache";
echo "";