summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/webcal/webcal.install
blob: 290b8b0d02c0b5c92c09ac4165f3bd3e938fcfd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 $*