#!/bin/sh -e INSTALL_PATH='/var/lib/erp5' case "$1" in configure) adduser --quiet --system --no-create-home --home /var/lib/erp5 --shell /bin/false erp5 chown -R erp5 /var/lib/erp5 echo -e '$INSTALL_PATH/var/log/timmy.log {\nsharedscripts\nrotate 10\nweekly\nmissingok\ncompress\n}' > /etc/logrotate.d/timmy echo '*/5 * * * * bin/timmy -k server.key -s https://www.tiolive.com/slap_service/ -b timmy-base.cfg -o timmy-controller.cfg -d timmy-instances -r bin/buildout -p timmy.pid -l var/log/timmy.log' > erp5.crontab crontab -u erp5 erp5.crontab rm -f erp5.crontab $INSTALL_PATH/bin/timmy-keygen -k $INSTALL_PATH/server.key echo "Navigate to http://appliance.tiolive.com/ and use the server key to register new computer" chown erp5 $INSTALL_PATH/server.key ;; abort-upgrade|abort-deconfigure|abort-remove) ;; *) echo "$0 called with unknown argument \`$1'" 1>&2 exit 1 ;; esac exit 0