Quellcode durchsuchen

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram vor 7 Jahren
Ursprung
Commit
ccb32bc1a3
2 geänderte Dateien mit 17 neuen und 6 gelöschten Zeilen
  1. 17
    5
      src/freedombone-app-ghost
  2. 0
    1
      src/freedombone-image-customise

+ 17
- 5
src/freedombone-app-ghost Datei anzeigen

@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+emacs#!/bin/bash
2 2
 #
3 3
 # .---.                  .              .
4 4
 # |                      |              |
@@ -175,9 +175,13 @@ function upgrade_ghost {
175 175
         return
176 176
     fi
177 177
     cd /var/www/$GHOST_DOMAIN_NAME/htdocs
178
+
179
+    npm i -g ghost-cli
178 180
     /usr/local/bin/ghost update
181
+
179 182
     ghost_replace_services
180 183
     ghost_remove_offsite_links
184
+
181 185
     chown -R ghost: /var/www/${GHOST_DOMAIN_NAME}/htdocs
182 186
     systemctl restart ghost
183 187
 }
@@ -378,7 +382,17 @@ function install_ghost {
378 382
 
379 383
     # now install ghost itself
380 384
     npm install -g ghost-cli
381
-    ghost install local
385
+
386
+    GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
387
+
388
+    ghost install local --port ${GHOST_PORT}
389
+
390
+    # kill the started ghost process
391
+    kill_pid=$(ps aux | grep "ghost run" | awk -F ' ' '{print $2}' | head -n 1)
392
+    kill $kill_pid
393
+
394
+    # NOTE: this has to be http, not https
395
+    sed -i "s|\"url\":|\"url\": \"http://${GHOST_DOMAIN_NAME}/\",|g" /var/www/${GHOST_DOMAIN_NAME}/htdocs/config.development.json
382 396
 
383 397
     adduser --system --home=/var/www/${GHOST_DOMAIN_NAME}/htdocs/ --group ghost
384 398
 
@@ -392,7 +406,7 @@ function install_ghost {
392 406
     echo 'User=ghost' >> /etc/systemd/system/ghost.service
393 407
     echo 'Group=ghost' >> /etc/systemd/system/ghost.service
394 408
     echo "WorkingDirectory=/var/www/${GHOST_DOMAIN_NAME}/htdocs" >> /etc/systemd/system/ghost.service
395
-    echo "ExecStart=/usr/local/bin/ghost run" >> /etc/systemd/system/ghost.service
409
+    echo "ExecStart=/usr/local/bin/ghost run -D" >> /etc/systemd/system/ghost.service
396 410
     echo "ExecStop=/usr/local/bin/ghost stop" >> /etc/systemd/system/ghost.service
397 411
     echo "ExecRestart=/usr/local/bin/ghost restart" >> /etc/systemd/system/ghost.service
398 412
     echo 'Restart=always' >> /etc/systemd/system/ghost.service
@@ -410,8 +424,6 @@ function install_ghost {
410 424
     systemctl daemon-reload
411 425
     systemctl start ghost
412 426
 
413
-    GHOST_ONION_HOSTNAME=$(add_onion_service ghost 80 ${GHOST_ONION_PORT})
414
-
415 427
     if [[ ${ONION_ONLY} == "no" ]]; then
416 428
         function_check nginx_http_redirect
417 429
         nginx_http_redirect ${GHOST_DOMAIN_NAME}

+ 0
- 1
src/freedombone-image-customise Datei anzeigen

@@ -1275,7 +1275,6 @@ function image_preinstall_repos {
1275 1275
     git clone $TOXIC_REPO $rootdir/repos/toxic
1276 1276
     git clone $TURTL_REPO $rootdir/repos/turtl
1277 1277
     git clone $KANBOARD_REPO $rootdir/repos/kanboard
1278
-    git clone $KEYSERVER_SKS_REPO $rootdir/repos/keyserver
1279 1278
     git clone $KEYSERVER_WEB_REPO $rootdir/repos/keyserverweb
1280 1279
     #git clone $WEKAN_REPO $rootdir/repos/wekan
1281 1280
     #git clone $FLOW_ROUTER_REPO $rootdir/repos/flowrouter