Fix no systemd reload

This commit is contained in:
nicolas.dorier
2019-09-15 17:25:50 +09:00
parent 8109fd8b81
commit 21f1af6280

View File

@@ -465,12 +465,16 @@ WantedBy=multi-user.target" > /etc/systemd/system/btcpayserver.service
fi fi
echo -e "BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service\n" echo -e "BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service\n"
systemctl daemon-reload if $SYSTEMD_RELOAD; then
systemctl enable btcpayserver systemctl daemon-reload
if $START; then systemctl enable btcpayserver
echo "BTCPay Server starting... this can take 5 to 10 minutes..." if $START; then
systemctl start btcpayserver echo "BTCPay Server starting... this can take 5 to 10 minutes..."
echo "BTCPay Server started" systemctl start btcpayserver
echo "BTCPay Server started"
fi
else
systemctl --no-reload enable btcpayserver
fi fi
elif $STARTUP_REGISTER && [[ -x "$(command -v initctl)" ]]; then elif $STARTUP_REGISTER && [[ -x "$(command -v initctl)" ]]; then
# Use upstart # Use upstart
@@ -495,7 +499,7 @@ script
end script" > /etc/init/start_containers.conf end script" > /etc/init/start_containers.conf
echo -e "BTCPay Server upstart configured in /etc/init/start_containers.conf\n" echo -e "BTCPay Server upstart configured in /etc/init/start_containers.conf\n"
if $START && $SYSTEMD_RELOAD; then if $START; then
initctl reload-configuration initctl reload-configuration
fi fi
fi fi