mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-03 09:29:34 +02:00
2018-08-13 Fred Gleason <fredg@paravelsystems.com>
* Removed support for the 'Backup Database' ['DB'] RML. * Removed support for automatic DB backup. * Dropped the 'STATIONS.BACKUP_DIR' and 'STATIONS.BACKUP_LIFE' fields drom the database. * Incremented the database version to 296.
This commit is contained in:
parent
16661cfb6d
commit
77f35e52f5
@ -17375,3 +17375,9 @@
|
|||||||
2018-08-13 Fred Gleason <fredg@paravelsystems.com>
|
2018-08-13 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Moved execution of maintenance routines from ripcd(8) to
|
* Moved execution of maintenance routines from ripcd(8) to
|
||||||
rdservice(8).
|
rdservice(8).
|
||||||
|
2018-08-13 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Removed support for the 'Backup Database' ['DB'] RML.
|
||||||
|
* Removed support for automatic DB backup.
|
||||||
|
* Dropped the 'STATIONS.BACKUP_DIR' and 'STATIONS.BACKUP_LIFE'
|
||||||
|
fields drom the database.
|
||||||
|
* Incremented the database version to 296.
|
||||||
|
@ -454,33 +454,6 @@
|
|||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 xml:id="sect.rml.database_backup__db_">
|
|
||||||
<title>Database Backup [DB]</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term>Module</term>
|
|
||||||
<listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>Mnemonic</term>
|
|
||||||
<listitem><userinput>DB</userinput></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Backup the Rivendell database.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<userinput>DB
|
|
||||||
<replaceable>filename</replaceable>!</userinput>
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Create a backup copy of the active Rivendell database in
|
|
||||||
<replaceable>filename</replaceable>.
|
|
||||||
</para>
|
|
||||||
</sect2>
|
|
||||||
|
|
||||||
<sect2 xml:id="sect.rml.disconnect_jack_ports__jd_">
|
<sect2 xml:id="sect.rml.disconnect_jack_ports__jd_">
|
||||||
<title>Disconnect Jack Ports [JD]</title>
|
<title>Disconnect Jack Ports [JD]</title>
|
||||||
<para>
|
<para>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
/*
|
/*
|
||||||
* Current Database Version
|
* Current Database Version
|
||||||
*/
|
*/
|
||||||
#define RD_VERSION_DATABASE 295
|
#define RD_VERSION_DATABASE 296
|
||||||
|
|
||||||
|
|
||||||
#endif // DBVERSION_H
|
#endif // DBVERSION_H
|
||||||
|
@ -229,7 +229,6 @@ RDMacro RDMacro::fromString(const QString &str,RDMacro::Role role)
|
|||||||
case RDMacro::CE:
|
case RDMacro::CE:
|
||||||
case RDMacro::CL:
|
case RDMacro::CL:
|
||||||
case RDMacro::CP:
|
case RDMacro::CP:
|
||||||
case RDMacro::DB:
|
|
||||||
case RDMacro::DL:
|
case RDMacro::DL:
|
||||||
case RDMacro::DP:
|
case RDMacro::DP:
|
||||||
case RDMacro::DS:
|
case RDMacro::DS:
|
||||||
|
@ -39,16 +39,15 @@ class RDMacro
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Command {AG=0x4147,AL=0x414C,BO=0x424F,CC=0x4343,CE=0x4345,CL=0x434C,
|
enum Command {AG=0x4147,AL=0x414C,BO=0x424F,CC=0x4343,CE=0x4345,CL=0x434C,
|
||||||
CP=0x4350,DB=0x4442,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,
|
CP=0x4350,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,EX=0x4558,
|
||||||
EX=0x4558,FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,
|
FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,JD=0x4A44,
|
||||||
JD=0x4A44,LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,
|
LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,MD=0x4D44,
|
||||||
MD=0x4D44,MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,
|
MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,PD=0x5044,
|
||||||
PD=0x5044,PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,
|
PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,PS=0x5053,
|
||||||
PS=0x5053,PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,
|
PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,RN=0x524E,
|
||||||
RN=0x524E,RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,
|
RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,SG=0x5347,
|
||||||
SG=0x5347,SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,
|
SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,SR=0x5352,
|
||||||
SR=0x5352,ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,
|
ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,UO=0x554F};
|
||||||
UO=0x554F};
|
|
||||||
enum Role {Invalid=0,Cmd=1,Reply=2};
|
enum Role {Invalid=0,Cmd=1,Reply=2};
|
||||||
RDMacro();
|
RDMacro();
|
||||||
RDMacro::Role role() const;
|
RDMacro::Role role() const;
|
||||||
|
@ -205,30 +205,6 @@ void RDStation::setTimeOffset(int msecs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString RDStation::backupPath() const
|
|
||||||
{
|
|
||||||
return RDGetSqlValue("STATIONS","NAME",station_name,"BACKUP_DIR").toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RDStation::setBackupPath(QString path) const
|
|
||||||
{
|
|
||||||
SetRow("BACKUP_DIR",path);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int RDStation::backupLife() const
|
|
||||||
{
|
|
||||||
return RDGetSqlValue("STATIONS","NAME",station_name,"BACKUP_LIFE").toInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void RDStation::setBackupLife(int days) const
|
|
||||||
{
|
|
||||||
SetRow("BACKUP_LIFE",days);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned RDStation::heartbeatCart() const
|
unsigned RDStation::heartbeatCart() const
|
||||||
{
|
{
|
||||||
return RDGetSqlValue("STATIONS","NAME",station_name,"HEARTBEAT_CART").
|
return RDGetSqlValue("STATIONS","NAME",station_name,"HEARTBEAT_CART").
|
||||||
|
@ -56,10 +56,6 @@ class RDStation
|
|||||||
QString webServiceUrl(RDConfig *config) const;
|
QString webServiceUrl(RDConfig *config) const;
|
||||||
int timeOffset();
|
int timeOffset();
|
||||||
void setTimeOffset(int msecs);
|
void setTimeOffset(int msecs);
|
||||||
QString backupPath() const;
|
|
||||||
void setBackupPath(QString path) const;
|
|
||||||
int backupLife() const;
|
|
||||||
void setBackupLife(int days) const;
|
|
||||||
unsigned heartbeatCart() const;
|
unsigned heartbeatCart() const;
|
||||||
void setHeartbeatCart(unsigned cartnum) const;
|
void setHeartbeatCart(unsigned cartnum) const;
|
||||||
unsigned heartbeatInterval() const;
|
unsigned heartbeatInterval() const;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
## automake.am
|
## Makefile.am
|
||||||
##
|
##
|
||||||
## Automake.am for rivendell/rdadmin
|
## Automake.am for rivendell/rdadmin
|
||||||
##
|
##
|
||||||
## (C) Copyright 2002-2006,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
## (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License version 2 as
|
## it under the terms of the GNU General Public License version 2 as
|
||||||
@ -55,7 +55,6 @@ dist_rdadmin_SOURCES = add_feed.cpp add_feed.h\
|
|||||||
add_user.cpp add_user.h\
|
add_user.cpp add_user.h\
|
||||||
autofill_carts.cpp autofill_carts.h\
|
autofill_carts.cpp autofill_carts.h\
|
||||||
edit_audios.cpp edit_audios.h\
|
edit_audios.cpp edit_audios.h\
|
||||||
edit_backup.cpp edit_backup.h\
|
|
||||||
edit_cartslots.cpp edit_cartslots.h\
|
edit_cartslots.cpp edit_cartslots.h\
|
||||||
edit_channelgpios.cpp edit_channelgpios.h\
|
edit_channelgpios.cpp edit_channelgpios.h\
|
||||||
edit_decks.cpp edit_decks.h\
|
edit_decks.cpp edit_decks.h\
|
||||||
@ -132,7 +131,6 @@ nodist_rdadmin_SOURCES = moc_add_feed.cpp\
|
|||||||
moc_add_user.cpp\
|
moc_add_user.cpp\
|
||||||
moc_autofill_carts.cpp\
|
moc_autofill_carts.cpp\
|
||||||
moc_edit_audios.cpp\
|
moc_edit_audios.cpp\
|
||||||
moc_edit_backup.cpp\
|
|
||||||
moc_edit_cartslots.cpp\
|
moc_edit_cartslots.cpp\
|
||||||
moc_edit_channelgpios.cpp\
|
moc_edit_channelgpios.cpp\
|
||||||
moc_edit_decks.cpp\
|
moc_edit_decks.cpp\
|
||||||
|
@ -1,169 +0,0 @@
|
|||||||
// edit_backup.cpp
|
|
||||||
//
|
|
||||||
// Edit an automatic backup configuration.
|
|
||||||
//
|
|
||||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
|
||||||
// published by the Free Software Foundation.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public
|
|
||||||
// License along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <qdialog.h>
|
|
||||||
#include <qstring.h>
|
|
||||||
#include <qpushbutton.h>
|
|
||||||
#include <qsqldatabase.h>
|
|
||||||
#include <qmessagebox.h>
|
|
||||||
//Added by qt3to4:
|
|
||||||
#include <QLabel>
|
|
||||||
|
|
||||||
#include <rd.h>
|
|
||||||
#include <rdtextvalidator.h>
|
|
||||||
|
|
||||||
#include <edit_backup.h>
|
|
||||||
|
|
||||||
EditBackup::EditBackup(RDStation *station,QWidget *parent)
|
|
||||||
: QDialog(parent)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// Fix the Window Size
|
|
||||||
//
|
|
||||||
setMinimumWidth(sizeHint().width());
|
|
||||||
setMaximumWidth(sizeHint().width());
|
|
||||||
setMinimumHeight(sizeHint().height());
|
|
||||||
setMaximumHeight(sizeHint().height());
|
|
||||||
|
|
||||||
//
|
|
||||||
// Create Fonts
|
|
||||||
//
|
|
||||||
QFont small_font=QFont("Helvetica",12,QFont::Bold);
|
|
||||||
small_font.setPixelSize(12);
|
|
||||||
QFont big_font=QFont("Helvetica",14,QFont::Bold);
|
|
||||||
big_font.setPixelSize(14);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Text Validator
|
|
||||||
//
|
|
||||||
RDTextValidator *validator=new RDTextValidator(this);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Dialog Name
|
|
||||||
//
|
|
||||||
edit_station=station;
|
|
||||||
setCaption(tr("Backup config for ")+station->name());
|
|
||||||
|
|
||||||
//
|
|
||||||
// Backup Life
|
|
||||||
//
|
|
||||||
edit_life_box=new QSpinBox(this);
|
|
||||||
edit_life_box->setGeometry(155,10,40,19);
|
|
||||||
edit_life_box->setMinValue(0);
|
|
||||||
edit_life_box->setMaxValue(30);
|
|
||||||
QLabel *edit_life_box_label=
|
|
||||||
new QLabel(edit_life_box,tr("Keep Backups For:"),this);
|
|
||||||
edit_life_box_label->setGeometry(10,10,140,19);
|
|
||||||
edit_life_box_label->setFont(small_font);
|
|
||||||
edit_life_box_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
|
|
||||||
QLabel *edit_life_box_unit=new QLabel(tr("days"),this);
|
|
||||||
edit_life_box_unit->setGeometry(200,10,120,19);
|
|
||||||
edit_life_box_unit->setFont(small_font);
|
|
||||||
edit_life_box_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic);
|
|
||||||
connect(edit_life_box,SIGNAL(valueChanged(int)),
|
|
||||||
this,SLOT(lifeChangedData(int)));
|
|
||||||
|
|
||||||
//
|
|
||||||
// Backup Directory
|
|
||||||
//
|
|
||||||
edit_path_edit=new QLineEdit(this);
|
|
||||||
edit_path_edit->setGeometry(155,35,sizeHint().width()-165,19);
|
|
||||||
edit_path_edit->setValidator(validator);
|
|
||||||
edit_path_label=new QLabel(edit_life_box,tr("Backup Directory:"),this);
|
|
||||||
edit_path_label->setGeometry(10,35,140,19);
|
|
||||||
edit_path_label->setFont(small_font);
|
|
||||||
edit_path_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Ok Button
|
|
||||||
//
|
|
||||||
QPushButton *ok_button=new QPushButton(this);
|
|
||||||
ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
|
|
||||||
ok_button->setDefault(true);
|
|
||||||
ok_button->setFont(small_font);
|
|
||||||
ok_button->setText(tr("&OK"));
|
|
||||||
connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));
|
|
||||||
|
|
||||||
//
|
|
||||||
// Cancel Button
|
|
||||||
//
|
|
||||||
QPushButton *cancel_button=new QPushButton(this);
|
|
||||||
cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
|
|
||||||
80,50);
|
|
||||||
cancel_button->setFont(small_font);
|
|
||||||
cancel_button->setText(tr("&Cancel"));
|
|
||||||
connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
|
||||||
|
|
||||||
//
|
|
||||||
// Populate Data
|
|
||||||
//
|
|
||||||
edit_life_box->setValue(edit_station->backupLife());
|
|
||||||
edit_path_edit->setText(edit_station->backupPath());
|
|
||||||
lifeChangedData(edit_life_box->value());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
EditBackup::~EditBackup()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QSize EditBackup::sizeHint() const
|
|
||||||
{
|
|
||||||
return QSize(375,130);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QSizePolicy EditBackup::sizePolicy() const
|
|
||||||
{
|
|
||||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void EditBackup::lifeChangedData(int days)
|
|
||||||
{
|
|
||||||
if(days==0) {
|
|
||||||
edit_path_label->setDisabled(true);
|
|
||||||
edit_path_edit->setDisabled(true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
edit_path_label->setEnabled(true);
|
|
||||||
edit_path_edit->setEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void EditBackup::okData()
|
|
||||||
{
|
|
||||||
if((edit_life_box->value()>0)&&(edit_path_edit->text().isEmpty())) {
|
|
||||||
QMessageBox::warning(this,tr("Path Missing"),
|
|
||||||
tr("You must supply a backup path!"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
edit_station->setBackupLife(edit_life_box->value());
|
|
||||||
edit_station->setBackupPath(edit_path_edit->text());
|
|
||||||
done(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void EditBackup::cancelData()
|
|
||||||
{
|
|
||||||
done(-1);
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
// edit_backup.h
|
|
||||||
//
|
|
||||||
// Edit an automatic backup configuration
|
|
||||||
//
|
|
||||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
|
||||||
// published by the Free Software Foundation.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public
|
|
||||||
// License along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef EDIT_BACKUP_H
|
|
||||||
#define EDIT_BACKUP_H
|
|
||||||
|
|
||||||
#include <qdialog.h>
|
|
||||||
#include <qsqldatabase.h>
|
|
||||||
#include <qlineedit.h>
|
|
||||||
#include <qspinbox.h>
|
|
||||||
#include <qlabel.h>
|
|
||||||
|
|
||||||
#include <rdstation.h>
|
|
||||||
|
|
||||||
class EditBackup : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
EditBackup(RDStation *station,QWidget *parent=0);
|
|
||||||
~EditBackup();
|
|
||||||
QSize sizeHint() const;
|
|
||||||
QSizePolicy sizePolicy() const;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void lifeChangedData(int days);
|
|
||||||
void okData();
|
|
||||||
void cancelData();
|
|
||||||
|
|
||||||
private:
|
|
||||||
RDStation *edit_station;
|
|
||||||
QSpinBox *edit_life_box;
|
|
||||||
QLineEdit *edit_path_edit;
|
|
||||||
QLabel *edit_path_label;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -43,7 +43,6 @@
|
|||||||
|
|
||||||
#include "view_adapters.h"
|
#include "view_adapters.h"
|
||||||
#include "edit_audios.h"
|
#include "edit_audios.h"
|
||||||
#include "edit_backup.h"
|
|
||||||
#include "edit_cartslots.h"
|
#include "edit_cartslots.h"
|
||||||
#include "edit_decks.h"
|
#include "edit_decks.h"
|
||||||
#include "list_dropboxes.h"
|
#include "list_dropboxes.h"
|
||||||
@ -434,15 +433,6 @@ EditStation::EditStation(QString sname,QWidget *parent)
|
|||||||
station_jack_button->setText(tr("JACK\nSettings"));
|
station_jack_button->setText(tr("JACK\nSettings"));
|
||||||
connect(station_jack_button,SIGNAL(clicked()),this,SLOT(jackSettingsData()));
|
connect(station_jack_button,SIGNAL(clicked()),this,SLOT(jackSettingsData()));
|
||||||
|
|
||||||
//
|
|
||||||
// Backups Configuration Button
|
|
||||||
//
|
|
||||||
station_backups_button=new QPushButton(this);
|
|
||||||
station_backups_button->setFont(font);
|
|
||||||
station_backups_button->setText(tr("Backups"));
|
|
||||||
connect(station_backups_button,SIGNAL(clicked()),
|
|
||||||
this,SLOT(editBackupsData()));
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Ok Button
|
// Ok Button
|
||||||
//
|
//
|
||||||
@ -840,13 +830,6 @@ void EditStation::editHostvarsData()
|
|||||||
delete list_conf;
|
delete list_conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditStation::editBackupsData()
|
|
||||||
{
|
|
||||||
EditBackup *edit_backup=new EditBackup(station_station,this);
|
|
||||||
edit_backup->exec();
|
|
||||||
delete edit_backup;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void EditStation::editDropboxesData()
|
void EditStation::editDropboxesData()
|
||||||
{
|
{
|
||||||
@ -998,9 +981,7 @@ void EditStation::resizeEvent(QResizeEvent *e)
|
|||||||
|
|
||||||
station_adapters_button->setGeometry(290,533,80,50);
|
station_adapters_button->setGeometry(290,533,80,50);
|
||||||
|
|
||||||
station_jack_button->setGeometry(110,593,80,50);
|
station_jack_button->setGeometry(155,593,80,50);
|
||||||
|
|
||||||
station_backups_button->setGeometry(200,593,80,50);
|
|
||||||
|
|
||||||
station_ok_button->setGeometry(size().width()-180,size().height()-60,80,50);
|
station_ok_button->setGeometry(size().width()-180,size().height()-60,80,50);
|
||||||
station_cancel_button->
|
station_cancel_button->
|
||||||
|
@ -69,7 +69,6 @@ class EditStation : public QDialog
|
|||||||
void editTtyData();
|
void editTtyData();
|
||||||
void editSwitcherData();
|
void editSwitcherData();
|
||||||
void editHostvarsData();
|
void editHostvarsData();
|
||||||
void editBackupsData();
|
|
||||||
void editDropboxesData();
|
void editDropboxesData();
|
||||||
void jackSettingsData();
|
void jackSettingsData();
|
||||||
void startCartClickedData();
|
void startCartClickedData();
|
||||||
@ -147,11 +146,9 @@ class EditStation : public QDialog
|
|||||||
QPushButton *station_ttys_button;
|
QPushButton *station_ttys_button;
|
||||||
QPushButton *station_adapters_button;
|
QPushButton *station_adapters_button;
|
||||||
QPushButton *station_jack_button;
|
QPushButton *station_jack_button;
|
||||||
QPushButton *station_backups_button;
|
|
||||||
QPushButton *station_ok_button;
|
QPushButton *station_ok_button;
|
||||||
QPushButton *station_cancel_button;
|
QPushButton *station_cancel_button;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif // EDIT_STATION_H
|
||||||
|
|
||||||
|
@ -782,35 +782,35 @@ a záloha původní databáze uložena v </translation>
|
|||||||
<name>EditBackup</name>
|
<name>EditBackup</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup config for </source>
|
<source>Backup config for </source>
|
||||||
<translation>Záloha nastavení pro</translation>
|
<translation type="obsolete">Záloha nastavení pro</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Keep Backups For:</source>
|
<source>Keep Backups For:</source>
|
||||||
<translation>Uchovat zálohy po:</translation>
|
<translation type="obsolete">Uchovat zálohy po:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>days</source>
|
<source>days</source>
|
||||||
<translation>dnů</translation>
|
<translation type="obsolete">dnů</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup Directory:</source>
|
<source>Backup Directory:</source>
|
||||||
<translation>Adresář pro zálohy:</translation>
|
<translation type="obsolete">Adresář pro zálohy:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&OK</translation>
|
<translation type="obsolete">&OK</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Cancel</source>
|
<source>&Cancel</source>
|
||||||
<translation>Z&rušit</translation>
|
<translation type="obsolete">Z&rušit</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Path Missing</source>
|
<source>Path Missing</source>
|
||||||
<translation>Cesta chybí</translation>
|
<translation type="obsolete">Cesta chybí</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>You must supply a backup path!</source>
|
<source>You must supply a backup path!</source>
|
||||||
<translation>Musíte zadat cestu pro zálohu!</translation>
|
<translation type="obsolete">Musíte zadat cestu pro zálohu!</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -3679,7 +3679,7 @@ serveru</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backups</source>
|
<source>Backups</source>
|
||||||
<translation>Zálohy</translation>
|
<translation type="obsolete">Zálohy</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
|
@ -708,35 +708,35 @@ worden. Aktuelle Version</translation>
|
|||||||
<name>EditBackup</name>
|
<name>EditBackup</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup config for </source>
|
<source>Backup config for </source>
|
||||||
<translation>Konfigurationsbackup für</translation>
|
<translation type="obsolete">Konfigurationsbackup für</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Keep Backups For:</source>
|
<source>Keep Backups For:</source>
|
||||||
<translation>Backups behalten für:</translation>
|
<translation type="obsolete">Backups behalten für:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>days</source>
|
<source>days</source>
|
||||||
<translation>Tage</translation>
|
<translation type="obsolete">Tage</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup Directory:</source>
|
<source>Backup Directory:</source>
|
||||||
<translation>Backup-Verzeichnis:</translation>
|
<translation type="obsolete">Backup-Verzeichnis:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&OK</translation>
|
<translation type="obsolete">&OK</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Cancel</source>
|
<source>&Cancel</source>
|
||||||
<translation>Abbre&chen</translation>
|
<translation type="obsolete">Abbre&chen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Path Missing</source>
|
<source>Path Missing</source>
|
||||||
<translation>Pfad fehlt</translation>
|
<translation type="obsolete">Pfad fehlt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>You must supply a backup path!</source>
|
<source>You must supply a backup path!</source>
|
||||||
<translation>Sie müssen einen Backup-Pfad angeben!</translation>
|
<translation type="obsolete">Sie müssen einen Backup-Pfad angeben!</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -3578,7 +3578,7 @@ Variablen</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backups</source>
|
<source>Backups</source>
|
||||||
<translation>Backups</translation>
|
<translation type="obsolete">Backups</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
|
@ -790,35 +790,35 @@ y un respaldo de la base de datos se guardó en </translation>
|
|||||||
<name>EditBackup</name>
|
<name>EditBackup</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup config for </source>
|
<source>Backup config for </source>
|
||||||
<translation>Configuración de respaldo para </translation>
|
<translation type="obsolete">Configuración de respaldo para </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Keep Backups For:</source>
|
<source>Keep Backups For:</source>
|
||||||
<translation>Mantener respald. por:</translation>
|
<translation type="obsolete">Mantener respald. por:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>days</source>
|
<source>days</source>
|
||||||
<translation>días</translation>
|
<translation type="obsolete">días</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup Directory:</source>
|
<source>Backup Directory:</source>
|
||||||
<translation>Carpeta de Respaldos:</translation>
|
<translation type="obsolete">Carpeta de Respaldos:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&Aceptar</translation>
|
<translation type="obsolete">&Aceptar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Cancel</source>
|
<source>&Cancel</source>
|
||||||
<translation>&Cancelar</translation>
|
<translation type="obsolete">&Cancelar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Path Missing</source>
|
<source>Path Missing</source>
|
||||||
<translation>Directorio no encontrado</translation>
|
<translation type="obsolete">Directorio no encontrado</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>You must supply a backup path!</source>
|
<source>You must supply a backup path!</source>
|
||||||
<translation>¡Debe indicar un directorio para el respaldo!</translation>
|
<translation type="obsolete">¡Debe indicar un directorio para el respaldo!</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -3678,7 +3678,7 @@ del Equipo</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backups</source>
|
<source>Backups</source>
|
||||||
<translation>Respaldos</translation>
|
<translation type="obsolete">Respaldos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
|
@ -464,41 +464,6 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>EditBackup</name>
|
|
||||||
<message>
|
|
||||||
<source>Backup config for </source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Keep Backups For:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>days</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Backup Directory:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&OK</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>&Cancel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Path Missing</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>You must supply a backup path!</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>EditCartSlots</name>
|
<name>EditCartSlots</name>
|
||||||
<message>
|
<message>
|
||||||
@ -3158,10 +3123,6 @@ GPIO</source>
|
|||||||
Variables</source>
|
Variables</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Backups</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -690,35 +690,35 @@ oppdatert til versjon </translation>
|
|||||||
<name>EditBackup</name>
|
<name>EditBackup</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup config for </source>
|
<source>Backup config for </source>
|
||||||
<translation>Sikringskopi-oppsett for</translation>
|
<translation type="obsolete">Sikringskopi-oppsett for</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Keep Backups For:</source>
|
<source>Keep Backups For:</source>
|
||||||
<translation>Lagra sikringskopiar i:</translation>
|
<translation type="obsolete">Lagra sikringskopiar i:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>days</source>
|
<source>days</source>
|
||||||
<translation>dagar</translation>
|
<translation type="obsolete">dagar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup Directory:</source>
|
<source>Backup Directory:</source>
|
||||||
<translation>Mappe for sikringskopiar:</translation>
|
<translation type="obsolete">Mappe for sikringskopiar:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&OK</translation>
|
<translation type="obsolete">&OK</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Cancel</source>
|
<source>&Cancel</source>
|
||||||
<translation>&Avbryt</translation>
|
<translation type="obsolete">&Avbryt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Path Missing</source>
|
<source>Path Missing</source>
|
||||||
<translation>Manglar stig</translation>
|
<translation type="obsolete">Manglar stig</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>You must supply a backup path!</source>
|
<source>You must supply a backup path!</source>
|
||||||
<translation>Du må velja ein stig til sikringskopi-mappa!</translation>
|
<translation type="obsolete">Du må velja ein stig til sikringskopi-mappa!</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -3554,7 +3554,7 @@ Variables</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backups</source>
|
<source>Backups</source>
|
||||||
<translation>Sikringskopiar</translation>
|
<translation type="obsolete">Sikringskopiar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
|
@ -690,35 +690,35 @@ oppdatert til versjon </translation>
|
|||||||
<name>EditBackup</name>
|
<name>EditBackup</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup config for </source>
|
<source>Backup config for </source>
|
||||||
<translation>Sikringskopi-oppsett for</translation>
|
<translation type="obsolete">Sikringskopi-oppsett for</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Keep Backups For:</source>
|
<source>Keep Backups For:</source>
|
||||||
<translation>Lagra sikringskopiar i:</translation>
|
<translation type="obsolete">Lagra sikringskopiar i:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>days</source>
|
<source>days</source>
|
||||||
<translation>dagar</translation>
|
<translation type="obsolete">dagar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup Directory:</source>
|
<source>Backup Directory:</source>
|
||||||
<translation>Mappe for sikringskopiar:</translation>
|
<translation type="obsolete">Mappe for sikringskopiar:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&OK</translation>
|
<translation type="obsolete">&OK</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Cancel</source>
|
<source>&Cancel</source>
|
||||||
<translation>&Avbryt</translation>
|
<translation type="obsolete">&Avbryt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Path Missing</source>
|
<source>Path Missing</source>
|
||||||
<translation>Manglar stig</translation>
|
<translation type="obsolete">Manglar stig</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>You must supply a backup path!</source>
|
<source>You must supply a backup path!</source>
|
||||||
<translation>Du må velja ein stig til sikringskopi-mappa!</translation>
|
<translation type="obsolete">Du må velja ein stig til sikringskopi-mappa!</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -3554,7 +3554,7 @@ Variables</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backups</source>
|
<source>Backups</source>
|
||||||
<translation>Sikringskopiar</translation>
|
<translation type="obsolete">Sikringskopiar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
|
@ -679,35 +679,35 @@ atualizada para a Versão</translation>
|
|||||||
<name>EditBackup</name>
|
<name>EditBackup</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup config for </source>
|
<source>Backup config for </source>
|
||||||
<translation>Configuração de cópia de Segurança para</translation>
|
<translation type="obsolete">Configuração de cópia de Segurança para</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Keep Backups For:</source>
|
<source>Keep Backups For:</source>
|
||||||
<translation>Guardar Backups por:</translation>
|
<translation type="obsolete">Guardar Backups por:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>days</source>
|
<source>days</source>
|
||||||
<translation>dias</translation>
|
<translation type="obsolete">dias</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backup Directory:</source>
|
<source>Backup Directory:</source>
|
||||||
<translation>Diretório do Backup:</translation>
|
<translation type="obsolete">Diretório do Backup:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
<translation>&OK</translation>
|
<translation type="obsolete">&OK</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Cancel</source>
|
<source>&Cancel</source>
|
||||||
<translation>&Cancelar</translation>
|
<translation type="obsolete">&Cancelar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Path Missing</source>
|
<source>Path Missing</source>
|
||||||
<translation>Está faltando o caminho</translation>
|
<translation type="obsolete">Está faltando o caminho</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>You must supply a backup path!</source>
|
<source>You must supply a backup path!</source>
|
||||||
<translation>Você deve inserir um caminho para a cópia de segurança!</translation>
|
<translation type="obsolete">Você deve inserir um caminho para a cópia de segurança!</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -3580,7 +3580,7 @@ Encoders</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Backups</source>
|
<source>Backups</source>
|
||||||
<translation>Cópias de
|
<translation type="obsolete">Cópias de
|
||||||
Segurança</translation>
|
Segurança</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -271,29 +271,6 @@ void MainObject::RunLocalMacros(RDMacro *rml_in)
|
|||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDMacro::DB:
|
|
||||||
if(rml->argQuantity()!=1) {
|
|
||||||
if(rml->echoRequested()) {
|
|
||||||
rml->acknowledge(false);
|
|
||||||
sendRml(rml);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(fork()==0) {
|
|
||||||
cmd=QString().sprintf("mysqldump -c Rivendell -h %s -u %s -p%s > %s",
|
|
||||||
(const char *)rda->config()->mysqlHostname(),
|
|
||||||
(const char *)rda->config()->mysqlUsername(),
|
|
||||||
(const char *)rda->config()->mysqlPassword(),
|
|
||||||
(const char *)rml->arg(0));
|
|
||||||
system((const char *)cmd);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
if(rml->echoRequested()) {
|
|
||||||
rml->acknowledge(true);
|
|
||||||
sendRml(rml);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RDMacro::GI:
|
case RDMacro::GI:
|
||||||
if(rml->argQuantity()!=5) {
|
if(rml->argQuantity()!=5) {
|
||||||
if(rml->echoRequested()) {
|
if(rml->echoRequested()) {
|
||||||
|
@ -172,14 +172,6 @@ MainObject::MainObject(QObject *parent)
|
|||||||
ripcd_notification_mcaster->bind(RD_NOTIFICATION_PORT);
|
ripcd_notification_mcaster->bind(RD_NOTIFICATION_PORT);
|
||||||
ripcd_notification_mcaster->subscribe(rda->system()->notificationAddress());
|
ripcd_notification_mcaster->subscribe(rda->system()->notificationAddress());
|
||||||
|
|
||||||
//
|
|
||||||
// Database Backup Timer
|
|
||||||
//
|
|
||||||
databaseBackup();
|
|
||||||
ripcd_backup_timer=new QTimer(this);
|
|
||||||
connect(ripcd_backup_timer,SIGNAL(timeout()),this,SLOT(databaseBackup()));
|
|
||||||
ripcd_backup_timer->start(86400000);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Exit Timer
|
// Exit Timer
|
||||||
//
|
//
|
||||||
@ -293,33 +285,6 @@ void MainObject::rmlReplyData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainObject::databaseBackup()
|
|
||||||
{
|
|
||||||
QString cmd;
|
|
||||||
QDateTime datetime=QDateTime::currentDateTime();
|
|
||||||
int life;
|
|
||||||
|
|
||||||
if((life=rda->station()->backupLife())<=0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(fork()==0) {
|
|
||||||
cmd=QString().sprintf("find %s -name *.sql -ctime +%d -exec rm \\{\\} \\;",
|
|
||||||
(const char *)rda->station()->backupPath(),
|
|
||||||
rda->station()->backupLife());
|
|
||||||
system((const char *)cmd);
|
|
||||||
cmd=QString().
|
|
||||||
sprintf("mysqldump -c Rivendell -h %s -u %s -p%s > %s/%s.sql",
|
|
||||||
(const char *)rda->config()->mysqlHostname(),
|
|
||||||
(const char *)rda->config()->mysqlUsername(),
|
|
||||||
(const char *)rda->config()->mysqlPassword(),
|
|
||||||
(const char *)rda->station()->backupPath(),
|
|
||||||
(const char *)datetime.date().toString("yyyyMMdd"));
|
|
||||||
system((const char *)cmd);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainObject::readyReadData(int conn_id)
|
void MainObject::readyReadData(int conn_id)
|
||||||
{
|
{
|
||||||
char data[1501];
|
char data[1501];
|
||||||
|
@ -74,7 +74,6 @@ class MainObject : public QObject
|
|||||||
void gpoStateData(int matrix,unsigned line,bool state);
|
void gpoStateData(int matrix,unsigned line,bool state);
|
||||||
void ttyTrapData(int cartnum);
|
void ttyTrapData(int cartnum);
|
||||||
void ttyScanData();
|
void ttyScanData();
|
||||||
void databaseBackup();
|
|
||||||
void macroTimerData(int num);
|
void macroTimerData(int num);
|
||||||
void readyReadData(int conn_id);
|
void readyReadData(int conn_id);
|
||||||
void killData(int conn_id);
|
void killData(int conn_id);
|
||||||
@ -125,7 +124,6 @@ class MainObject : public QObject
|
|||||||
RDTTYDevice *ripcd_tty_dev[MAX_TTYS];
|
RDTTYDevice *ripcd_tty_dev[MAX_TTYS];
|
||||||
RDTty::Termination ripcd_tty_term[MAX_TTYS];
|
RDTty::Termination ripcd_tty_term[MAX_TTYS];
|
||||||
RDCodeTrap *ripcd_tty_trap[MAX_TTYS];
|
RDCodeTrap *ripcd_tty_trap[MAX_TTYS];
|
||||||
QTimer *ripcd_backup_timer;
|
|
||||||
bool ripc_onair_flag;
|
bool ripc_onair_flag;
|
||||||
QTimer *ripc_macro_timer[RD_MAX_MACRO_TIMERS];
|
QTimer *ripc_macro_timer[RD_MAX_MACRO_TIMERS];
|
||||||
unsigned ripc_macro_cart[RD_MAX_MACRO_TIMERS];
|
unsigned ripc_macro_cart[RD_MAX_MACRO_TIMERS];
|
||||||
|
@ -38,6 +38,25 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg) co
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Revert 296
|
||||||
|
//
|
||||||
|
if((cur_schema==296)&&(set_schema<cur_schema)) {
|
||||||
|
sql=QString("alter table STATIONS add column ")+
|
||||||
|
"BACKUP_DIR char(255) after TIME_OFFSET";
|
||||||
|
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sql=QString("alter table STATIONS add column ")+
|
||||||
|
"BACKUP_LIFE int default 0 after BACKUP_DIR";
|
||||||
|
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteSchemaVersion(--cur_schema);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Revert 295
|
// Revert 295
|
||||||
//
|
//
|
||||||
|
@ -136,7 +136,7 @@ void MainObject::InitializeSchemaMap() {
|
|||||||
global_version_map["2.17"]=268;
|
global_version_map["2.17"]=268;
|
||||||
global_version_map["2.18"]=272;
|
global_version_map["2.18"]=272;
|
||||||
global_version_map["2.19"]=275;
|
global_version_map["2.19"]=275;
|
||||||
global_version_map["2.20"]=295;
|
global_version_map["2.20"]=296;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7875,6 +7875,19 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg) co
|
|||||||
WriteSchemaVersion(++cur_schema);
|
WriteSchemaVersion(++cur_schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((cur_schema<296)&&(set_schema>cur_schema)) {
|
||||||
|
sql=QString("alter table STATIONS drop column BACKUP_DIR");
|
||||||
|
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
sql=QString("alter table STATIONS drop column BACKUP_LIFE");
|
||||||
|
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteSchemaVersion(++cur_schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user