40-install 634 B

12345678910111213141516171819202122
  1. #!/usr/bin/with-contenv bash
  2. # fix for linting
  3. declare config
  4. # install photoshow
  5. echo "fetching photoshow files from github"
  6. git clone https://github.com/thibaud-rohmer/PhotoShow.git /config/www/PhotoShow
  7. sed -i \
  8. -e "s#$config->photos_dir.*#$config->photos_dir = \"/Pictures\";#g" \
  9. -e "s#$config->ps_generated.*#$config->ps_generated = \"/Thumbs\";#g" \
  10. -e "s#.*config->timezone.*#\$config->timezone = \"${TZ}\";#g" \
  11. /config/www/PhotoShow/config.php
  12. # patch in fixed keyboard.js file
  13. cp /defaults/keyboard.js /config/www/PhotoShow/src/js/keyboard.js
  14. # permissions
  15. chown -R abc:abc \
  16. /config/www/PhotoShow \
  17. /Thumbs