configure-files)
cp -a /etc/aliases /etc/aliases.gforge-new
# Redirect "noreply" mail to the bit bucket (if need be)
- noreply_to_bitbucket=`/usr/share/gforge/bin/forge_get_config noreply_to_bitbucket`
- if [ "$noreply_to_bitbucket" = "true" ] ; then
+ noreply_to_bitbucket=$(/usr/share/gforge/bin/forge_get_config noreply_to_bitbucket)
+ if [ "$noreply_to_bitbucket" != "no" ] ; then
if ! grep -q "^noreply:" /etc/aliases.gforge-new ; then
echo "### Next line inserted by GForge install" >> /etc/aliases.gforge-new
echo "noreply: /dev/null" >> /etc/aliases.gforge-new
fi
# Redirect "gforge" mail to the site admin
- server_admin=`/usr/share/gforge/bin/forge_get_config admin_email`
+ server_admin=$(/usr/share/gforge/bin/forge_get_config admin_email)
if ! grep -q "^gforge:" /etc/aliases.gforge-new ; then
echo "### Next line inserted by GForge install" >> /etc/aliases.gforge-new
echo "gforge: $server_admin" >> /etc/aliases.gforge-new
tmp1=$(mktemp /tmp/$pattern)
# First, get the list of local domains right - add gforge domains to 'mydestination'
perl -e '
-chomp($domain_name=`/usr/share/gforge/bin/forge_get_config web_host`);
+require ("/usr/share/gforge/lib/include.pl") ;
my $l;
while ($l = <>) {
last if l =~ /^\s*mydestination/ ;
' < /etc/postfix/main.cf.gforge-new > $tmp1
grep -q '^[[:space:]]*relay_domains' $tmp1 || echo 'relay_domains = $mydestination' >>$tmp1
perl -i -e '
-chomp($sys_lists_host=`/usr/share/gforge/bin/forge_get_config lists_host`);
+require ("/usr/share/gforge/lib/include.pl") ;
my $l;
while (($l = <>) !~ /^\s*relay_domains/) { print $l; };
chomp $l;
tmp2=$(mktemp /tmp/$pattern)
# Second, insinuate our forwarding rules in the directors section
perl -e '
-chomp($domain_name=`/usr/share/gforge/bin/forge_get_config web_host`);
-chomp($sys_dbuser=`/usr/share/gforge/bin/forge_get_config database_user`);
-chomp($sys_dbname=`/usr/share/gforge/bin/forge_get_config database_name`);
+require ("/usr/share/gforge/lib/include.pl") ;
my $gf_block;
my $l;
configure)
[ -x /usr/bin/newaliases ] && newaliases
- echo "`/usr/share/gforge/bin/forge_get_config lists_host` mailman:" > /var/lib/gforge/etc/postfix-transport
+ echo "$(/usr/share/gforge/bin/forge_get_config lists_host) mailman:" > /var/lib/gforge/etc/postfix-transport
postmap /var/lib/gforge/etc/postfix-transport
;;
tmp1=$(mktemp /tmp/$pattern)
cp -a /etc/aliases /etc/aliases.gforge-new
# Redirect "noreply" mail to the bit bucket (if need be)
- noreply_to_bitbucket=`/usr/share/gforge/bin/forge_get_config noreply_to_bitbucket`
- if [ "$noreply_to_bitbucket" = "true" ] ; then
+ noreply_to_bitbucket=$(/usr/share/gforge/bin/forge_get_config noreply_to_bitbucket)
+ if [ "$noreply_to_bitbucket" != "no" ] ; then
grep -v "^noreply:" /etc/aliases.gforge-new > $tmp1
cat $tmp1 > /etc/aliases.gforge-new
fi
tmp1=$(mktemp /tmp/$pattern)
# First, replace the list of local domains
perl -e '
-chomp($domain_name=`/usr/share/gforge/bin/forge_get_config web_host`);
-chomp($sys_lists_host=`/usr/share/gforge/bin/forge_get_config lists_host`);
+require ("/usr/share/gforge/lib/include.pl") ;
while ($l = <>) {
last if l =~ /^\s*mydestination/ ;
print $l;
while ($l = <>) { print $l; };
' < /etc/postfix/main.cf.gforge-new > $tmp1
grep -q '^[[:space:]]*relay_domains' $tmp1 && perl -i -e '
-chomp($sys_lists_host=`/usr/share/gforge/bin/forge_get_config lists_host`);
+require ("/usr/share/gforge/lib/include.pl") ;
while (($l = <>) !~ /^\s*relay_domains/) {
print $l;
};