post_install() { mkdir /data/srv/tmp chmod 777 /data/srv/tmp mysql -u root -e 'create database webcal;' mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO webcal@localhost IDENTIFIED BY 'webcal' WITH GRANT OPTION;" echo installing the default webcal database #install tables mysql webcal < /data/srv/httpd/htdocs/webcal/createdb.sql chown -R nobody:nobody /data/srv/httpd/htdocs/webcal/ chmod 775 /data/srv/httpd/htdocs/webcal/includes MVDIR=/usr/bin ln -s $MVDIR/sendreminders.sh /etc/cron.tenminutes/01-sendreminders.sh . /etc/systemconfig mysql webcal -e "update webcal_config set cal_value="\"${timezone}\"" where cal_setting='SERVER_TIMEZONE' ;" mysql webcal -e "update webcal_config set cal_value="\"${timezone}\"" where cal_setting='TIMEZONE' ;" mysql webcal -e "update webcal_user_pref set cal_value="\"${timezone}\"" where cal_setting='TIMEZONE' ;" } post_upgrade() { echo "nothing to do" chown -R nobody:nobody /data/srv/httpd/htdocs/webcal/ chmod 775 /data/srv/httpd/htdocs/webcal/includes MVDIR=/usr/bin ln -s $MVDIR/sendreminders.sh /etc/cron.tenminutes/01-sendreminders.sh } op=$1 shift $op $*