From: <abe...@us...> - 2015-07-10 17:12:43
|
Revision: 7147 http://sourceforge.net/p/astlinux/code/7147 Author: abelbeck Date: 2015-07-10 17:12:40 +0000 (Fri, 10 Jul 2015) Log Message: ----------- web interface, update Staff tab for exclude files from unionfs backup Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/staff.php Modified: branches/1.0/package/webinterface/altweb/admin/staff.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/staff.php 2015-07-10 16:50:26 UTC (rev 7146) +++ branches/1.0/package/webinterface/altweb/admin/staff.php 2015-07-10 17:12:40 UTC (rev 7147) @@ -65,6 +65,9 @@ $excludecmd = 'find /oldroot/mnt/asturw/ -type f | sed -e "s:^/oldroot/mnt/asturw/::" | sed -n'; $excludecmd .= ' -e "s:^stat/var/lib/asterisk/sounds/.*$:&:p"'; $excludecmd .= ' -e "s:^stat/var/lib/asterisk/moh/.*$:&:p"'; + $excludecmd .= ' -e "s:^stat/var/www/cache/.*$:&:p"'; + $excludecmd .= ' -e "s:^stat/var/packages/.*$:&:p"'; + $excludecmd .= ' -e "s:^usr/lib/locale/.*$:&:p"'; shell($excludecmd.' >'.$excludefile.' 2>/dev/null', $status); shell($tarcmd.$asturw.' -X '.$excludefile.' $(ls -1 /oldroot/mnt/asturw/ | sed -e "s/^mnt$//") -C /oldroot/mnt/asturw >/dev/null 2>/dev/null', $status); @unlink($excludefile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2016-01-15 16:45:35
|
Revision: 7460 http://sourceforge.net/p/astlinux/code/7460 Author: abelbeck Date: 2016-01-15 16:45:32 +0000 (Fri, 15 Jan 2016) Log Message: ----------- web interface, Staff tab, add 'Restart FOP2' support if installed Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/staff.php Modified: branches/1.0/package/webinterface/altweb/admin/staff.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/staff.php 2016-01-15 01:00:19 UTC (rev 7459) +++ branches/1.0/package/webinterface/altweb/admin/staff.php 2016-01-15 16:45:32 UTC (rev 7460) @@ -1,6 +1,6 @@ <?php -// Copyright (C) 2008-2013 Lonnie Abelbeck +// Copyright (C) 2008-2016 Lonnie Abelbeck // This is free software, licensed under the GNU General Public License // version 3 as published by the Free Software Foundation; you can // redistribute it and/or modify it under the terms of the GNU @@ -9,6 +9,7 @@ // staff.php for AstLinux // 12-12-2009 // 01-21-2013, Add Restart Asterisk +// 01-15-2016, Add Restart FOP2 // // System location of webgui-staff-backup.conf $CONFFILE = '/mnt/kd/webgui-staff-backup.conf'; @@ -156,6 +157,16 @@ } else { $result = 7; } + } elseif (isset($_POST['submit_restart_fop2'])) { + $result = 99; + if (isset($_POST['confirm_restart_fop2'])) { + $mesg = date('Y-m-d H:i:s').' RESTART_FOP2 Remote Address: '.$_SERVER['REMOTE_ADDR']; + @file_put_contents($LOGFILE, $mesg."\n", FILE_APPEND); + chmod($LOGFILE, 0600); + $result = restartPROCESS('fop2', 26, $result); + } else { + $result = 7; + } } elseif (isset($_POST['submit_shutdown'])) { $result = 99; if (isset($_POST['confirm_shutdown'])) { @@ -190,6 +201,8 @@ putHtml('<p style="color: red;">Backup Failed, error archiving unionfs partition.</p>'); } elseif ($result == 25) { putHtml('<p style="color: green;">Asterisk'.statusPROCESS('asterisk').'.</p>'); + } elseif ($result == 26) { + putHtml('<p style="color: green;">Asterisk Flash Operating Panel2'.statusPROCESS('fop2').'.</p>'); } elseif ($result == 40) { putHtml('<p style="color: green;">Reboot Scheduled within 24 hours.</p>'); } elseif ($result == 41) { @@ -233,6 +246,13 @@ putHtml('–'); putHtml('<input type="checkbox" value="restart_asterisk" name="confirm_restart_asterisk" /> Confirm'); putHtml('</td></tr>'); +if (is_addon_package('fop2')) { + putHtml('<tr><td class="dialogText" style="text-align: center;">'); + putHtml('<input type="submit" value="Restart FOP2" name="submit_restart_fop2" />'); + putHtml('–'); + putHtml('<input type="checkbox" value="restart_fop2" name="confirm_restart_fop2" /> Confirm'); + putHtml('</td></tr>'); +} putHtml('<tr><td style="text-align: center;">'); putHtml('<h2>Reboot/Restart System:</h2>'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2016-01-19 00:44:41
|
Revision: 7470 http://sourceforge.net/p/astlinux/code/7470 Author: abelbeck Date: 2016-01-19 00:44:39 +0000 (Tue, 19 Jan 2016) Log Message: ----------- web interface, Staff tab, add 'Primary /mnt/kd/ files' Backup choice, which as for 'All' is AES encrypted Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/staff.php Modified: branches/1.0/package/webinterface/altweb/admin/staff.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/staff.php 2016-01-17 20:57:25 UTC (rev 7469) +++ branches/1.0/package/webinterface/altweb/admin/staff.php 2016-01-19 00:44:39 UTC (rev 7470) @@ -10,6 +10,7 @@ // 12-12-2009 // 01-21-2013, Add Restart Asterisk // 01-15-2016, Add Restart FOP2 +// 01-18-2016, Add Primary /mnt/kd/ files Backup // // System location of webgui-staff-backup.conf $CONFFILE = '/mnt/kd/webgui-staff-backup.conf'; @@ -60,7 +61,19 @@ $asturw = (getPREFdef($global_prefs, 'system_backup_asturw') === 'yes') ? '/mnt/kd/asturw'.$suffix : ''; $prefix = '/mnt/kd/.'; $tmpfile = $backup_name.'-'.$backup_type.'-'.date('Y-m-d').$suffix; - $srcfile = '$(ls -1 /mnt/kd/)'; + if ($backup_type === 'primary') { + if (is_dir('/mnt/kd/phoneprov/templates')) { + $templates = ' "phoneprov/templates"'; + } else { + $templates = ''; + } + $srcfile = '$(ls -1 /mnt/kd/ | sed -e "s/^cdr-.*//" -e "s/^monitor$//" -e "s/^voicemail$//"'; + $srcfile .= ' -e "s/^bin$//" -e "s/^log.*//" -e "s/^backup.*//"'; + $srcfile .= ' -e "s/^fossil$//" -e "s/^phoneprov$//" -e "s/^tftpboot$//" -e "s/^wanpipe$//")'; + $srcfile .= $templates; + } else { + $srcfile = '$(ls -1 /mnt/kd/)'; + } if ($asturw !== '') { $excludefile = tempnam("/tmp", "PHP_"); $excludecmd = 'find /oldroot/mnt/asturw/ -type f | sed -e "s:^/oldroot/mnt/asturw/::" | sed -n'; @@ -232,6 +245,7 @@ putHtml('</td></tr><tr><td style="text-align: center;">'); putHtml('<select name="backup_type">'); $sel = (getPREFdef($global_prefs, 'system_backup_asturw') === 'yes') ? '& unionfs ' : ''; + putHtml('<option value="primary">Primary /mnt/kd/ '.$sel.'files</option>'); putHtml('<option value="full">All /mnt/kd/ '.$sel.'files</option>'); putHtml('</select>'); putHtml('</td></tr><tr><td style="text-align: center;">'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2016-01-19 16:01:33
|
Revision: 7472 http://sourceforge.net/p/astlinux/code/7472 Author: abelbeck Date: 2016-01-19 16:01:31 +0000 (Tue, 19 Jan 2016) Log Message: ----------- web interface, Staff tab, tweaks to Primary Backup Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/staff.php Modified: branches/1.0/package/webinterface/altweb/admin/staff.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/staff.php 2016-01-19 00:47:33 UTC (rev 7471) +++ branches/1.0/package/webinterface/altweb/admin/staff.php 2016-01-19 16:01:31 UTC (rev 7472) @@ -62,14 +62,15 @@ $prefix = '/mnt/kd/.'; $tmpfile = $backup_name.'-'.$backup_type.'-'.date('Y-m-d').$suffix; if ($backup_type === 'primary') { - if (is_dir('/mnt/kd/phoneprov/templates')) { - $templates = ' "phoneprov/templates"'; - } else { - $templates = ''; + $wanpipe = ''; + foreach (glob('/mnt/kd/wanpipe/*.conf') as $globfile) { + $wanpipe .= ' "wanpipe/'.basename($globfile).'"'; } + $templates = (is_dir('/mnt/kd/phoneprov/templates')) ? ' "phoneprov/templates"' : ''; $srcfile = '$(ls -1 /mnt/kd/ | sed -e "s/^cdr-.*//" -e "s/^monitor$//" -e "s/^voicemail$//"'; - $srcfile .= ' -e "s/^bin$//" -e "s/^log.*//" -e "s/^backup.*//"'; - $srcfile .= ' -e "s/^fossil$//" -e "s/^phoneprov$//" -e "s/^tftpboot$//" -e "s/^wanpipe$//")'; + $srcfile .= ' -e "s/^bin$//" -e "s/^.*[.]bak$//" -e "s/^log.*//" -e "s/^backup.*//"'; + $srcfile .= ' -e "s/^wanpipe$//" -e "s/^fossil$//" -e "s/^phoneprov$//" -e "s/^tftpboot$//" -e "s/^lost[+]found$//")'; + $srcfile .= $wanpipe; $srcfile .= $templates; } else { $srcfile = '$(ls -1 /mnt/kd/)'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |