/* Creating the bare minimun user configuration */
/* */
/********************************************************/
+//root is the default preset admin
INSERT INTO admins (email)
VALUES ('root@$DOMAINNAME');
+
+//inserting the mail account
+INSERT INTO emails (email,password)
+ VALUES ('root','$RPASS');
+
+
esac
#loading database definition
if [ -n "$MSQL" ] ; then
+ echo "#--------------- Create Database ----------------" >> $SQLLOG
cpp -P -D$DB_TYPE /usr/share/$APPNAME/sql/$APPNAME.sql| tee -a $SQLLOG | $MSQL
+ echo "#--------------- Set Preset value ---------------" >> $SQLLOG
cpp -P -D$DB_TYPE /usr/share/$APPNAME/sql/preset.sql | tee -a $SQLLOG | $MSQL
+ echo "#--------------- Init Process Completed ---------" >> $SQLLOG
fi
exit -3;
;;
esac
+#extracting local configuration value
+export DOMAINNAME=`dnsdomainname`;
+export RPASS=`grep root /etc/shadow | cut -d':' -f2 |sed -e 's:\\\\$:\\\\\\\\$:g'`;
}
#----------------------------------------------------------------------
#creating mailleur local certificat