Creation of git-ssb daemon

This commit is contained in:
Bob Mottram 2017-12-16 15:44:17 +00:00
parent 1935deb53f
commit 05df6f5f13
2 changed files with 5 additions and 22 deletions

View File

@ -447,24 +447,6 @@ function install_scuttlebot {
echo '[Install]' >> /etc/systemd/system/scuttlebot.service echo '[Install]' >> /etc/systemd/system/scuttlebot.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/scuttlebot.service echo 'WantedBy=multi-user.target' >> /etc/systemd/system/scuttlebot.service
echo '[Unit]' > /etc/systemd/system/git_ssb.service
echo 'Description=Git SSB (SSB git web interface)' >> /etc/systemd/system/git_ssb.service
echo 'After=syslog.target' >> /etc/systemd/system/git_ssb.service
echo 'After=network.target' >> /etc/systemd/system/git_ssb.service
echo 'After=scuttlebot.target' >> /etc/systemd/system/git_ssb.service
echo '' >> /etc/systemd/system/git_ssb.service
echo '[Service]' >> /etc/systemd/system/git_ssb.service
echo 'Type=simple' >> /etc/systemd/system/git_ssb.service
echo 'User=scuttlebot' >> /etc/systemd/system/git_ssb.service
echo 'Group=scuttlebot' >> /etc/systemd/system/git_ssb.service
echo "WorkingDirectory=/etc/scuttlebot" >> /etc/systemd/system/git_ssb.service
echo "ExecStart=/usr/bin/git ssb web --public localhost:$GIT_SSB_PORT" >> /etc/systemd/system/git_ssb.service
echo 'Restart=always' >> /etc/systemd/system/git_ssb.service
echo 'Environment="USER=scuttlebot"' >> /etc/systemd/system/git_ssb.service
echo '' >> /etc/systemd/system/git_ssb.service
echo '[Install]' >> /etc/systemd/system/git_ssb.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/git_ssb.service
chown -R scuttlebot:scuttlebot /etc/scuttlebot chown -R scuttlebot:scuttlebot /etc/scuttlebot
# files gw_name myhostname mdns4_minimal [NOTFOUND=return] dns # files gw_name myhostname mdns4_minimal [NOTFOUND=return] dns
@ -474,9 +456,6 @@ function install_scuttlebot {
systemctl enable scuttlebot.service systemctl enable scuttlebot.service
systemctl daemon-reload systemctl daemon-reload
systemctl start scuttlebot.service systemctl start scuttlebot.service
systemctl enable git_ssb.service
systemctl daemon-reload
systemctl start git_ssb.service
sleep 3 sleep 3
@ -514,6 +493,10 @@ function install_scuttlebot {
scuttlebot_git_setup scuttlebot_git_setup
git_ssb_script git_ssb_script
systemctl enable git_ssb.service
systemctl daemon-reload
systemctl start git_ssb.service
function_check create_site_certificate function_check create_site_certificate
create_site_certificate ${SCUTTLEBOT_DOMAIN_NAME} 'yes' create_site_certificate ${SCUTTLEBOT_DOMAIN_NAME} 'yes'

View File

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