There are a few major annoyances with the current snipsnap scripts:
1) It runs as root, which is not necessary.
2) /etc/init.d/snipsnap stop doesn't stop the running daemon
3) The /opt/snipsnap dir contains files modified during execution
Steps to Reproduce:
1. /etc/init.d/snipsnap start
2. Visit localhost:8668/install
3. Make a new application
Files are created in /opt/snipsnap (log files), in /opt/snipsnap/application
(datafiles) and /opt/snipsnap/cache (cache files)
Application is run as root.
Application should be run as a non-privileged user (i.e. snipsnap).
Log files should have been created in /var/log/snipsnap
Datafiles should be put in /var/lib/snipsnap/applications
Cachefiles should be put in /var/lib/snipsnap/cache
The attached script fixes some of the problems. It assumes
1) snipsnap is started as the user snipsnap
2) /var/log/snipsnap is owned by snipsnap
3) /var/lib/snipsnap and subdirs is owned by snipsnap
4) /var/lib/applications exists
4) /var/lib/lib/snipsnap/snipsnap-installer.war exists
Created attachment 18470 [details]
Must be run as user snipsnap!
removed from the tree, until someone steps up and starts maintaining it