Jelajahi Sumber

Transferring the installation of handlers to a separate script

blezz-tech 2 hari lalu
induk
melakukan
21bb367d4e
2 mengubah file dengan 16 tambahan dan 12 penghapusan
  1. 16 0
      bin/install_handlers.sh
  2. 0 12
      bin/install_services.sh

+ 16 - 0
bin/install_handlers.sh

@@ -0,0 +1,16 @@
+
+# Checking for webservice_running/handlers/.env
+if [ -f webservice_running/handlers/.env ]; then
+    echo "env file for handlers already exists. "
+else
+    echo_warning "Creating env file for handlers."
+    cp webservice_running/handlers/.env.example webservice_running/handlers/.env
+    echo_success "Created env file for handlers."
+fi
+
+echo_warning "Installation handlers"
+webservice_running/handlers/conf/bin/install.sh
+
+echo_warning "Reloading systemd daemon"
+systemctl daemon-reload
+echo_success "Reloaded systemd daemon"

+ 0 - 12
bin/install_services.sh

@@ -13,15 +13,3 @@ echo_success "Copied sharix_open.service to /etc/systemd/system/ folder"
 echo_warning "Reloading systemd daemon"
 systemctl daemon-reload
 echo_success "Reloaded systemd daemon"
-
-# Checking for webservice_running/handlers/.env
-if [ -f webservice_running/handlers/.env ]; then
-    echo "env file for handlers already exists. "
-else
-    echo_warning "Creating env file for handlers."
-    cp webservice_running/handlers/.env.example webservice_running/handlers/.env
-    echo_success "Created env file for handlers."
-fi
-
-echo_warning "Installation handlers"
-webservice_running/handlers/conf/bin/install.sh