2 source_path=$(forge_get_config source_path)
3 config_path=$(forge_get_config config_path)
4 # No way to detect Apache's distro integration, so let's hard-code:
5 httpd_service=$(if [ -e /etc/redhat-release ]; then echo 'httpd'; else echo 'apache2'; fi)
8 print "Usage: $0 plugin_name"
13 # Run plugin-specific DB install/upgrade
14 # TODO: don't automatically enable the plugin, esp. for non-packaged installs
15 $source_path/bin/upgrade-db.php $1
18 # Restart apache if there is some change in config
20 if [ ! -e $source_path/plugins/$1/etc/httpd.conf.d/ ]; then exit; fi
21 cd $source_path/plugins/$1/etc/
22 for i in $(ls httpd.conf.d/*); do
23 if [ ! -e $config_path/$i ]; then
24 $source_path/post-install.d/httpd-expand-conf.php $i $config_path/$i
27 *secrets*) chmod 600 $config_path/$i;;
30 # Hard-coded detection of distro-specific Apache conf layout
31 httpd_service=$(if [ -e /etc/redhat-release ]; then echo 'httpd'; else echo 'apache2'; fi)
32 service $httpd_service reload >/dev/null || true
36 # Run plugin-specific install
37 if [ -x $source_path/plugins/$1/bin/install.sh ]; then
38 echo "Running $source_path/plugins/$1/bin/install.sh configure"
39 $source_path/plugins/$1/bin/install.sh configure