From 4c84e3d49fdda4efa1cab6c738011264f2cee75b Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Wed, 10 Oct 2018 19:18:32 -0700 Subject: [PATCH 1/3] Changed /etc/init.d/rivendell to systemctl --- rdselect/rdselect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rdselect/rdselect.cpp b/rdselect/rdselect.cpp index 8b157e25..a9f63f11 100644 --- a/rdselect/rdselect.cpp +++ b/rdselect/rdselect.cpp @@ -271,7 +271,7 @@ bool MainWidget::Shutdown(int id) { RDConfig *conf=select_configs[id]; - if(system("/etc/init.d/rivendell stop")!=0) { + if(system("systemctl stop rivendell")!=0) { return false; } system(QString("umount ")+conf->audioRoot()); @@ -300,7 +300,7 @@ bool MainWidget::Startup(int id) } unlink(RD_CONF_FILE); symlink(select_filenames[id],RD_CONF_FILE); - if(system("/etc/init.d/rivendell start")!=0) { + if(system("systemctl start rivendell")!=0) { return false; } From 338f7fb0130ae0e48b2c9466a9729347e4185bfe Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Wed, 10 Oct 2018 19:27:26 -0700 Subject: [PATCH 2/3] Changed /etc/init.d/rivendell to systemctl --- utils/rdalsaconfig/rdalsaconfig.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/rdalsaconfig/rdalsaconfig.cpp b/utils/rdalsaconfig/rdalsaconfig.cpp index e0110a63..5c9199fe 100644 --- a/utils/rdalsaconfig/rdalsaconfig.cpp +++ b/utils/rdalsaconfig/rdalsaconfig.cpp @@ -46,8 +46,8 @@ bool alsa_daemon_start_needed=false; void StopDaemons() { if(alsa_manage_daemons) { - if(system("/etc/init.d/rivendell status")==0) { - system("/etc/init.d/rivendell stop"); + if(system("systemctl --quiet is-active rivendell")==0) { + system("systemctl --quiet stop rivendell"); alsa_daemon_start_needed=true; } } @@ -57,7 +57,7 @@ void StopDaemons() void StartDaemons() { if(alsa_daemon_start_needed) { - system("/etc/init.d/rivendell start"); + system("systemctl --quiet start rivendell"); } } @@ -148,7 +148,7 @@ MainWidget::MainWidget(QWidget *parent) tr("The \"--manage-daemons\" switch requires root permissions.")); exit(256); } - if(system("/etc/init.d/rivendell status")==0) { + if(system("systemctl --quiet is-active rivendell")==0) { int r=QMessageBox::warning(this,tr("RDAlsaConfig warning"), tr("Rivendell audio will be interrupted while running this program.\nContinue?"), QMessageBox::Yes,QMessageBox::No); From f0bf7d3b210aaac701a5dda032e7f3b6eb933a38 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 16 Oct 2018 20:15:10 -0400 Subject: [PATCH 3/3] 2018-10-16 Patrick Linstruth * Updated rdalsaconfig(8) to use the proper Systemd idiom for restarting the 'rivendell' service. * Updated rdselect(8) to use the proper Systemd idiom for restarting the 'rivendell' service. --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 983dbcff..1ee0eaa4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17798,3 +17798,8 @@ 2018-10-16 Patrick Linstruth * Updated instructions in the 'Audio Resources' dialog in rdadmin(1) to reflect the transition to Systemd. +2018-10-16 Patrick Linstruth + * Updated rdalsaconfig(8) to use the proper Systemd idiom for + restarting the 'rivendell' service. + * Updated rdselect(8) to use the proper Systemd idiom for + restarting the 'rivendell' service.