Add --no-startup-register
This commit is contained in:
@@ -58,8 +58,9 @@ Install BTCPay on this server
|
|||||||
This script must be run as root, except on Mac OS
|
This script must be run as root, except on Mac OS
|
||||||
|
|
||||||
-i : Run install and start BTCPay Server
|
-i : Run install and start BTCPay Server
|
||||||
--install-only : Run install only
|
--install-only: Run install only
|
||||||
--docker-unavailable : If specified, same as --install-only, but will also skip install steps requiring docker
|
--docker-unavailable: Same as --install-only, but will also skip install steps requiring docker
|
||||||
|
--no-startup-register: Do not register BTCPayServer to start via systemctl or upstart
|
||||||
|
|
||||||
This script will:
|
This script will:
|
||||||
|
|
||||||
@@ -105,6 +106,7 @@ END
|
|||||||
}
|
}
|
||||||
START=""
|
START=""
|
||||||
HAS_DOCKER=true
|
HAS_DOCKER=true
|
||||||
|
STARTUP_REGISTER=true
|
||||||
while (( "$#" )); do
|
while (( "$#" )); do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-i)
|
-i)
|
||||||
@@ -120,6 +122,10 @@ while (( "$#" )); do
|
|||||||
HAS_DOCKER=false
|
HAS_DOCKER=false
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
--no-startup-register)
|
||||||
|
STARTUP_REGISTER=false
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
--) # end argument parsing
|
--) # end argument parsing
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -406,7 +412,7 @@ if [[ "$BTCPAYGEN_OLD_PREGEN" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Schedule for reboot
|
# Schedule for reboot
|
||||||
if [[ -x "$(command -v systemctl)" ]]; then
|
if $STARTUP_REGISTER && [[ -x "$(command -v systemctl)" ]]; then
|
||||||
# Use systemd
|
# Use systemd
|
||||||
if [[ -e "/etc/init/start_containers.conf" ]]; then
|
if [[ -e "/etc/init/start_containers.conf" ]]; then
|
||||||
echo -e "Uninstalling upstart script /etc/init/start_containers.conf"
|
echo -e "Uninstalling upstart script /etc/init/start_containers.conf"
|
||||||
@@ -449,7 +455,7 @@ WantedBy=multi-user.target" > /etc/systemd/system/btcpayserver.service
|
|||||||
echo "BTCPay Server started"
|
echo "BTCPay Server started"
|
||||||
fi
|
fi
|
||||||
$START && echo "Impossible to start a systemctl service in chroot... skipping"
|
$START && echo "Impossible to start a systemctl service in chroot... skipping"
|
||||||
elif [[ -x "$(command -v initctl)" ]]; then
|
elif $STARTUP_REGISTER && [[ -x "$(command -v initctl)" ]]; then
|
||||||
# Use upstart
|
# Use upstart
|
||||||
echo "Using upstart"
|
echo "Using upstart"
|
||||||
echo "
|
echo "
|
||||||
|
|||||||
Reference in New Issue
Block a user