--- smeserver-freepbx-0.1/createlinks.recordings_security 2009-03-23 10:38:06.000000000 +0100 +++ smeserver-freepbx-0.1/createlinks 2009-03-23 10:40:00.000000000 +0100 @@ -37,6 +37,7 @@ event_link("freepbx-checkinstall", $event, "10"); event_link("freepbx-applypatch", $event, "20"); +event_link("freepbx-security", $event, "30"); event_link("freepbx-dump-astdb", "pre-backup", "30"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init"); --- smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-security.recordings_security 2009-03-23 10:38:30.000000000 +0100 +++ smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-security 2009-03-23 10:39:12.000000000 +0100 @@ -0,0 +1,11 @@ +#!/bin/bash + +# Put a random password for ari admin. This function should be more documented + +PASS=`/usr/bin/openssl rand -base64 40 | /usr/bin/tr -c -d '[:graph:]'` + +if [ -e /opt/freepbx/recordings/includes/main.conf.php ]; then + sed -i -e "s/\$ARI_ADMIN_PASSWORD =\"ari_password\";/\$ARI_ADMIN_PASSWORD = \"$PASS\";/" \ + /opt/freepbx/recordings/includes/main.conf.php +fi +