4 if [ ! -d "$builddir" ]; then
5 echo "I can not put my files in $builddir because it doesn't exist"
9 prefix
='/opt/monitor/op5/ninja'
10 AP2CONFDIR
='/etc/opt/csw/apache2/extra'
11 gsed
=/opt
/csw
/bin
/gsed
13 PATH
=/usr
/sbin
:/usr
/bin
:/opt
/csw
/bin
/:/opt
/csw
/gcc
3/bin
:/usr
/ccs
/bin
16 ninja_dir
=$builddir$prefix
25 # Whitelist instead of blacklist
34 generateKohanaDbFieldData.php \
43 # The build script always looks for the op5build dir in the build root,
44 # to use it *for* packaging, not include it *in* the package.
45 cp -r op5build
$builddir
48 -e 's,^\(.config..site_domain.. = .\)/ninja/,\1/monitor/,' \
49 -e 's/^\(.config..product_name.. = .\)Nagios/\1op5 Monitor/' \
50 -e 's/^\(.config..show_cgi_links.. = .\)true/\1false/' \
51 -e 's/^\(.config..version_info.. = .\)\/etc\/ninja-release/\1\/etc\/op5-monitor-release/' \
52 $ninja_dir/application
/config
/config.php
54 $gsed -i -e "s/'IN_PRODUCTION', FALSE/'IN_PRODUCTION', TRUE/" $ninja_dir/index.php
56 # Used for the enterprise edition of Ninja
57 cp $builddir/op5build
/login.png
$ninja_dir/application
/views
/css
/default
/images
58 cp $builddir/op5build
/favicon.ico
$ninja_dir/application
/views
/icons
/16x16
/
59 cp $builddir/op5build
/icon.png
$ninja_dir/application
/views
/icons
/
61 chmod -R a
+r
$ninja_dir
63 mkdir
-p $builddir/etc
/cron.d
/
64 install -m 644 -c $builddir/etc
/cron.d
/ install_scripts
/scheduled_reports.crontab
65 install -m 644 -c $builddir/etc
/cron.d
/ install_scripts
/recurring_downtime.crontab
67 /opt
/csw
/bin
/gsed
-i -e 's/default\/cron/cron\/cron/' \
68 $builddir/etc
/cron.d
/scheduled_reports.crontab
69 /opt
/csw
/bin
/gsed
-i -e 's/\/usr\/bin\/php/\/opt\/csw\/php5\/bin\/php/' \
70 $builddir/etc
/cron.d
/scheduled_reports.crontab
71 /opt
/csw
/bin
/gsed
-i -e 's/\/usr\/bin\/php/\/opt\/csw\/php5\/bin\/php/' \
72 $builddir/etc
/cron.d
/recurring_downtime.crontab
73 /opt
/csw
/bin
/gsed
-i -e 's/\/usr\/bin\/php/\/opt\/csw\/php5\/bin\/php/' \
74 $builddir/opt
/monitor
/op
5/ninja
/application
/controllers
/default.php
75 /opt
/csw
/bin
/gsed
-i 's#tar tfz#/opt/csw/bin/gtar tfz#' $builddir/opt
/monitor
/op
5/ninja
/application
/controllers
/backup.php
78 for f
in cli-helpers
/apr_md5_validate install_scripts
/ninja_db_init.sh
;
80 chmod 755 $ninja_dir/$f
83 # The custom_widgets dir need to be writable by the apache user
84 chmod 775 $ninja_dir/application
/custom_widgets
86 mkdir
-p $builddir/var
/www
/html
87 ln -sf $prefix $builddir/var
/www
/html
/monitor
88 ln -sf $prefix $builddir/var
/www
/html
/ninja
90 mkdir
-p $builddir$AP2CONFDIR
91 cp $builddir/op5build
/solaris
/ninja.httpd-conf
$builddir$AP2CONFDIR/ninja.conf