feat: add systemd libretime.target

- add wanted by
- instantly start services in vagrant
This commit is contained in:
jo 2022-05-08 19:20:03 +02:00 committed by Kyle Robbertze
parent a9c2271559
commit 510e978952
8 changed files with 27 additions and 1 deletions

2
Vagrantfile vendored
View File

@ -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

View File

@ -1,5 +1,6 @@
[Unit]
Description=LibreTime Media Analyzer Service
PartOf=libretime.target
[Service]
Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/analyzer.log

View File

@ -1,5 +1,6 @@
[Unit]
Description=LibreTime API Service
PartOf=libretime.target
[Service]
Type=notify

11
install
View File

@ -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

View File

@ -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

View File

@ -1,5 +1,6 @@
[Unit]
Description=LibreTime Liquidsoap Service
PartOf=libretime.target
[Service]
Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/liquidsoap.log

View File

@ -1,5 +1,6 @@
[Unit]
Description=LibreTime Playout Service
PartOf=libretime.target
[Service]
Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/playout.log

View File

@ -1,5 +1,6 @@
[Unit]
Description=LibreTime Worker Service
PartOf=libretime.target
[Service]
Environment=LIBRETIME_LOG_FILEPATH=@@LOG_DIR@@/worker.log