# HG changeset patch # User Christophe Lincoln # Date 1389041329 0 # Node ID c4b94b7a7dd6ad9f7c5503a1d9838aab028ec5c5 # Parent 9d1c1115562aa7b17976d2a78a30f569b6b2c7aa Warning on first install if content is not writable diff -r 9d1c1115562a -r c4b94b7a7dd6 Makefile --- a/Makefile Mon Jan 06 18:47:03 2014 +0000 +++ b/Makefile Mon Jan 06 20:48:49 2014 +0000 @@ -34,25 +34,20 @@ install: install -m 0700 -d $(DESTDIR)$(LOGIN)/people install -m 0700 -d $(DESTDIR)$(LOGIN)/auth - install -m 0755 -d $(DESTDIR)$(WEB)/content install -m 0755 -d $(DESTDIR)$(WEB)/cache install -m 0777 -d $(DESTDIR)$(PREFIX)/share/applications #install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale cp -a config.cgi favicon.ico index.cgi README style.css \ - images lib plugins content $(DESTDIR)$(WEB) + images lib plugins content/ $(DESTDIR)$(WEB) + #cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale + install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/applications - install -m 0644 data/tinycm.desktop \ - $(DESTDIR)$(PREFIX)/share/applications - #cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale - - # Auth system may be used by an other app - #touch $(DESTDIR)$(LOGIN)/auth/people - #chmod 0600 $(DESTDIR)$(LOGIN)/auth/people + # Set permissions chown -R www.www $(DESTDIR)$(LOGIN)/auth chown -R www.www $(DESTDIR)$(LOGIN)/people - chown www.www $(DESTDIR)$(WEB)/content - chown www.www $(DESTDIR)$(WEB)/cache + chown -R www.www $(DESTDIR)$(WEB)/content + chown -R www.www $(DESTDIR)$(WEB)/cache uninstall: rm -rf $(DESTDIR)$(WEB) diff -r 9d1c1115562a -r c4b94b7a7dd6 index.cgi --- a/index.cgi Mon Jan 06 18:47:03 2014 +0000 +++ b/index.cgi Mon Jan 06 20:48:49 2014 +0000 @@ -108,8 +108,9 @@ cat > $wiki/$index.txt << EOT ==== Welcome ==== -This is the default index page of your CM, you can start to edit and adding -some content to your TinyCM. +This is the default index page of your TinyCM, you can login then start to +edit and adding some content. You can read the help about text formating +and functions: Help page EOT } @@ -732,6 +733,10 @@ # Generate a default index on first run. if [ ! -f "$wiki/$index.txt" ]; then default_index + if [ ! -f "$wiki/$index.txt" ]; then + echo "
Directory: content/ is not writable
" + html_footer && exit 0 + fi fi if [ ! -f "$wiki/$d.txt" ]; then echo "

$d

"