1
0
Эх сурвалжийг харах

Merge branch 'unstable' of blezz-tech/sharix-open-webapp-base into unstable

1 өөрчлөгдсөн 13 нэмэгдсэн , 12 устгасан
  1. 13 12
      bin/install.sh

+ 13 - 12
bin/install.sh

@@ -83,17 +83,6 @@ else
     exit
 fi
 
-# Checking for sharix_open.service
-if [ -f conf/sharix_open.service ]; then
-    echo "File sharix_open.service already exists"
-else
-    cp conf/sharix_open.service.example conf/sharix_open.service
-    echo_success "File sharix_open.service was successfully created"
-    echo "Write the settings for systemd service, if you want."
-    echo_warning "To continue, restart the install.sh"
-    exit
-fi
-
 # Run Django migrations and other commands
 python manage.py makemigrations dbsynce tickets webservice_running landing user
 python manage.py migrate
@@ -106,4 +95,16 @@ if (($GENERATE_TEST_USERS)); then
     python manage.py create_metaservice_test_users
 fi
 
-#cp conf/sharix_open.service /etc/systemd/system/
+echo_warning "Recreating sharix_open.service"
+\cp conf/sharix_open.service.example conf/sharix_open.service
+sed -i "s|WORKING_DIRECTORY|$(pwd)|g" conf/sharix_open.service
+echo_success "Recreated sharix_open.service"
+
+echo_warning "Copying sharix_open.service to /etc/systemd/system/ folder"
+\cp conf/sharix_open.service /etc/systemd/system/
+echo_success "Copied sharix_open.service to /etc/systemd/system/ folder"
+
+echo_warning "Reloading systemd daemon"
+systemctl daemon-reload
+echo_success "Reloaded systemd daemon"
+