diff --git a/Vagrantfile b/Vagrantfile index 5f5351cb9..a106d997f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -83,6 +83,8 @@ Vagrant.configure('2') do |config| libretime-api migrate libretime-api set_icecast_passwords --from-icecast-config + + systemctl start libretime.target SCRIPT config.vm.provision 'install', type: 'shell', inline: $script diff --git a/analyzer/install/systemd/libretime-analyzer.service b/analyzer/install/systemd/libretime-analyzer.service index 74e0f53e6..b4109116f 100644 --- a/analyzer/install/systemd/libretime-analyzer.service +++ b/analyzer/install/systemd/libretime-analyzer.service @@ -1,5 +1,6 @@ [Unit] Description=LibreTime Media Analyzer Service +PartOf=libretime.target [Service] Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/analyzer.log diff --git a/api/install/systemd/libretime-api.service b/api/install/systemd/libretime-api.service index c5839295d..20fa55600 100644 --- a/api/install/systemd/libretime-api.service +++ b/api/install/systemd/libretime-api.service @@ -1,5 +1,6 @@ [Unit] Description=LibreTime API Service +PartOf=libretime.target [Service] Type=notify diff --git a/install b/install index da246ede5..5fda18bce 100755 --- a/install +++ b/install @@ -687,6 +687,9 @@ fi ######################################################################################## section "Services" + +install_service "libretime.target" "$SCRIPT_DIR/installer/systemd/libretime.target" + systemctl daemon-reload if apache2ctl configtest; then @@ -716,10 +719,16 @@ ${cyan}\ $ sudo -u $LIBRETIME_USER libretime-api migrate ${yellow}\ -Finally, run the following command to configure the default icecast passwords in the database: +Run the following command to configure the default icecast passwords in the database: ${cyan}\ $ sudo libretime-api set_icecast_passwords --from-icecast-config +${yellow}\ +Finally, start LibreTime using the following command: + +${cyan}\ +$ sudo systemctl start libretime.target + ${reset}" fi diff --git a/installer/systemd/libretime.target b/installer/systemd/libretime.target new file mode 100644 index 000000000..0fa95219d --- /dev/null +++ b/installer/systemd/libretime.target @@ -0,0 +1,10 @@ +[Unit] +Description=LibreTime Services +Wants=libretime-analyzer.service +Wants=libretime-api.service +Wants=libretime-celery.service +Wants=libretime-liquidsoap.service +Wants=libretime-playout.service + +[Install] +WantedBy=multi-user.target diff --git a/playout/install/systemd/libretime-liquidsoap.service b/playout/install/systemd/libretime-liquidsoap.service index f13e85aeb..d61dd5230 100644 --- a/playout/install/systemd/libretime-liquidsoap.service +++ b/playout/install/systemd/libretime-liquidsoap.service @@ -1,5 +1,6 @@ [Unit] Description=LibreTime Liquidsoap Service +PartOf=libretime.target [Service] Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/liquidsoap.log diff --git a/playout/install/systemd/libretime-playout.service b/playout/install/systemd/libretime-playout.service index 7dc949311..049b3fa62 100644 --- a/playout/install/systemd/libretime-playout.service +++ b/playout/install/systemd/libretime-playout.service @@ -1,5 +1,6 @@ [Unit] Description=LibreTime Playout Service +PartOf=libretime.target [Service] Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/playout.log diff --git a/worker/install/systemd/libretime-celery.service b/worker/install/systemd/libretime-celery.service index 259898d85..9e18f1a8e 100644 --- a/worker/install/systemd/libretime-celery.service +++ b/worker/install/systemd/libretime-celery.service @@ -1,5 +1,6 @@ [Unit] Description=LibreTime Worker Service +PartOf=libretime.target [Service] Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/worker.log