From c4bccf16f943b0ee75348e567cdfa8b902331c64 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Sun, 17 Jul 2022 23:58:51 +0200 Subject: [PATCH] feat(installer): remove allow-restart flag (#1970) Services management should be handled by the admin. You can use the following command `systemctl restart libretime.target` --- Vagrantfile | 3 +-- docs/admin-manual/setup/install.md | 6 ------ install | 28 ++++++++++------------------ 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index afb7318c9..f0eb6734d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -80,14 +80,13 @@ Vagrant.configure('2') do |config| LIBRETIME_RABBITMQ_PASSWORD=libretime \ bash install \ --listen-port 8080 \ - --allow-restart \ --in-place \ http://192.168.10.100:8080 libretime-api migrate libretime-api set_icecast_passwords --from-icecast-config - systemctl start libretime.target + systemctl restart libretime.target SCRIPT config.vm.provision 'install', type: 'shell', inline: $script diff --git a/docs/admin-manual/setup/install.md b/docs/admin-manual/setup/install.md index 5ebc6021e..5a496a781 100644 --- a/docs/admin-manual/setup/install.md +++ b/docs/admin-manual/setup/install.md @@ -152,12 +152,6 @@ The install script will use randomly generated passwords to create the PostgreSQ ::: -:::info - -By default, the install script will not restart any service for you, this is to prevent unwanted restarts on production environment. To let the install script restart the services, you need to pass the `--allow-restart` flag. - -::: - Feel free to run `./install --help` to get more details. #### Using hardware audio output diff --git a/install b/install index f1b79fb3d..5eedc216b 100755 --- a/install +++ b/install @@ -67,7 +67,6 @@ Options: --user USER, -u USER User used to run LibreTime. --listen-port PORT, -p PORT Listen port for LibreTime. - --allow-restart, -r Allow the installer to restart LibreTime services. --in-place, -i Install LibreTime in place. --no-setup-icecast Do not setup Icecast. @@ -104,9 +103,6 @@ LIBRETIME_LISTEN_PORT=${LIBRETIME_LISTEN_PORT:-"80"} # > Public URL for LibreTime. LIBRETIME_PUBLIC_URL=${LIBRETIME_PUBLIC_URL:-} -# > Allow the installer to restart LibreTime services. We don't want to restart the -# > services by default to prevent uncontrolled downtime. -LIBRETIME_ALLOW_RESTART=${LIBRETIME_ALLOW_RESTART:-false} # > Install LibreTime in editable mode. # > Will keep working files in the project directory. LIBRETIME_INSTALL_IN_PLACE=${LIBRETIME_INSTALL_IN_PLACE:-false} @@ -130,10 +126,6 @@ while [[ $# -gt 0 ]]; do LIBRETIME_LISTEN_PORT=$2 shift 2 ;; - --allow-restart | -r) - LIBRETIME_ALLOW_RESTART=true - shift 1 - ;; --in-place | -i) LIBRETIME_INSTALL_IN_PLACE=true shift 1 @@ -289,10 +281,6 @@ install_service() { # service_restart_if_active service_restart_if_active() { - if ! $LIBRETIME_ALLOW_RESTART && [[ "$1" =~ libretime ]]; then - return - fi - if systemctl is-active "$1" > /dev/null; then info "restarting $1 service" systemctl restart "$1" @@ -710,12 +698,6 @@ systemctl daemon-reload service_restart_if_active "php$PHP_VERSION-fpm" service_restart_if_active "nginx" -service_restart_if_active "libretime-api" -service_restart_if_active "libretime-celery" -service_restart_if_active "libretime-analyzer" -service_restart_if_active "libretime-playout" -service_restart_if_active "libretime-liquidsoap" - # Instructions ######################################################################################## @@ -742,5 +724,15 @@ Finally, start LibreTime using the following command: ${cyan}\ $ sudo systemctl start libretime.target +${reset}" + +else + printf " +${yellow}\ +You can restart LibreTime using the following command: + +${cyan}\ +$ sudo systemctl restart libretime.target + ${reset}" fi