Ver código fonte

Creation of git-ssb daemon

Bob Mottram 7 anos atrás
pai
commit
05df6f5f13
2 arquivos alterados com 5 adições e 22 exclusões
  1. 4
    21
      src/freedombone-app-scuttlebot
  2. 1
    1
      src/freedombone-image-mesh

+ 4
- 21
src/freedombone-app-scuttlebot Ver arquivo

@@ -447,24 +447,6 @@ function install_scuttlebot {
447 447
     echo '[Install]' >> /etc/systemd/system/scuttlebot.service
448 448
     echo 'WantedBy=multi-user.target' >> /etc/systemd/system/scuttlebot.service
449 449
 
450
-    echo '[Unit]' > /etc/systemd/system/git_ssb.service
451
-    echo 'Description=Git SSB (SSB git web interface)' >> /etc/systemd/system/git_ssb.service
452
-    echo 'After=syslog.target' >> /etc/systemd/system/git_ssb.service
453
-    echo 'After=network.target' >> /etc/systemd/system/git_ssb.service
454
-    echo 'After=scuttlebot.target' >> /etc/systemd/system/git_ssb.service
455
-    echo '' >> /etc/systemd/system/git_ssb.service
456
-    echo '[Service]' >> /etc/systemd/system/git_ssb.service
457
-    echo 'Type=simple' >> /etc/systemd/system/git_ssb.service
458
-    echo 'User=scuttlebot' >> /etc/systemd/system/git_ssb.service
459
-    echo 'Group=scuttlebot' >> /etc/systemd/system/git_ssb.service
460
-    echo "WorkingDirectory=/etc/scuttlebot" >> /etc/systemd/system/git_ssb.service
461
-    echo "ExecStart=/usr/bin/git ssb web --public localhost:$GIT_SSB_PORT" >> /etc/systemd/system/git_ssb.service
462
-    echo 'Restart=always' >> /etc/systemd/system/git_ssb.service
463
-    echo 'Environment="USER=scuttlebot"' >> /etc/systemd/system/git_ssb.service
464
-    echo '' >> /etc/systemd/system/git_ssb.service
465
-    echo '[Install]' >> /etc/systemd/system/git_ssb.service
466
-    echo 'WantedBy=multi-user.target' >> /etc/systemd/system/git_ssb.service
467
-
468 450
     chown -R scuttlebot:scuttlebot /etc/scuttlebot
469 451
 
470 452
     # files gw_name myhostname mdns4_minimal [NOTFOUND=return] dns
@@ -474,9 +456,6 @@ function install_scuttlebot {
474 456
     systemctl enable scuttlebot.service
475 457
     systemctl daemon-reload
476 458
     systemctl start scuttlebot.service
477
-    systemctl enable git_ssb.service
478
-    systemctl daemon-reload
479
-    systemctl start git_ssb.service
480 459
 
481 460
     sleep 3
482 461
 
@@ -514,6 +493,10 @@ function install_scuttlebot {
514 493
     scuttlebot_git_setup
515 494
     git_ssb_script
516 495
 
496
+    systemctl enable git_ssb.service
497
+    systemctl daemon-reload
498
+    systemctl start git_ssb.service
499
+
517 500
     function_check create_site_certificate
518 501
     create_site_certificate ${SCUTTLEBOT_DOMAIN_NAME} 'yes'
519 502
 

+ 1
- 1
src/freedombone-image-mesh Ver arquivo

@@ -1328,7 +1328,7 @@ function initialise_scuttlebot_pub {
1328 1328
     if [ -f /etc/nginx/sites-available/git_ssb ]; then
1329 1329
         sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
1330 1330
         ln -s /etc/nginx/sites-available/git_ssb /etc/nginx/sites-enabled/git_ssb
1331
-        systemctl enable scuttlebot.service
1331
+        systemctl enable git_ssb.service
1332 1332
         systemctl start git_ssb.service
1333 1333
     fi
1334 1334
 }