From dfee48fcff07b8c4709137135da6c2d925e0df74 Mon Sep 17 00:00:00 2001 From: Greg Szabo Date: Tue, 12 Sep 2017 16:07:15 -0400 Subject: [PATCH] cosmos-sdk package modifications --- build/cosmos-sdk/DEBIAN/prerm | 4 ++-- .../systemd/system-preset/50-basecoin.preset | 3 --- .../system-preset/50-cosmos-sdk.preset | 3 +++ .../systemd/system/basecoin-server.service | 23 ------------------- .../systemd/system/cosmos-sdk-server.service | 23 +++++++++++++++++++ .../{basecoin.service => cosmos-sdk.service} | 12 +++++----- 6 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 build/cosmos-sdk/etc/systemd/system-preset/50-basecoin.preset create mode 100644 build/cosmos-sdk/etc/systemd/system-preset/50-cosmos-sdk.preset delete mode 100644 build/cosmos-sdk/etc/systemd/system/basecoin-server.service create mode 100644 build/cosmos-sdk/etc/systemd/system/cosmos-sdk-server.service rename build/cosmos-sdk/etc/systemd/system/{basecoin.service => cosmos-sdk.service} (71%) diff --git a/build/cosmos-sdk/DEBIAN/prerm b/build/cosmos-sdk/DEBIAN/prerm index 63fd84409..d7a07ab8f 100644 --- a/build/cosmos-sdk/DEBIAN/prerm +++ b/build/cosmos-sdk/DEBIAN/prerm @@ -18,8 +18,8 @@ set -e case "$1" in remove|upgrade|deconfigure) - systemctl stop basecoin 2> /dev/null || : - systemctl stop basecoin-service 2> /dev/null || : + systemctl stop cosmos-sdk 2> /dev/null || : + systemctl stop cosmos-sdk-service 2> /dev/null || : ;; failed-upgrade) diff --git a/build/cosmos-sdk/etc/systemd/system-preset/50-basecoin.preset b/build/cosmos-sdk/etc/systemd/system-preset/50-basecoin.preset deleted file mode 100644 index c97097b13..000000000 --- a/build/cosmos-sdk/etc/systemd/system-preset/50-basecoin.preset +++ /dev/null @@ -1,3 +0,0 @@ -disable basecoin.service -disable basecoin-server.service - diff --git a/build/cosmos-sdk/etc/systemd/system-preset/50-cosmos-sdk.preset b/build/cosmos-sdk/etc/systemd/system-preset/50-cosmos-sdk.preset new file mode 100644 index 000000000..7f9e2f450 --- /dev/null +++ b/build/cosmos-sdk/etc/systemd/system-preset/50-cosmos-sdk.preset @@ -0,0 +1,3 @@ +disable cosmos-sdk.service +disable cosmos-sdk-server.service + diff --git a/build/cosmos-sdk/etc/systemd/system/basecoin-server.service b/build/cosmos-sdk/etc/systemd/system/basecoin-server.service deleted file mode 100644 index 62392d52a..000000000 --- a/build/cosmos-sdk/etc/systemd/system/basecoin-server.service +++ /dev/null @@ -1,23 +0,0 @@ -[Unit] -Description=Basecoin server -Requires=network-online.target -BindTo=basecoin.service -PartOf=basecoin.service -After=network-online.target basecoin.service -PropagatesReloadTo=basecoin.service -ReloadPropagatedFrom=basecoin.service - -[Service] -Environment="TMHOME=/etc/basecoin/tendermint" -Restart=on-failure -User=basecoin -Group=basecoin -PermissionsStartOnly=true -ExecStart=/usr/bin/tendermint node -ExecReload=/bin/kill -HUP $MAINPID -KillSignal=SIGTERM - -[Install] -WantedBy=multi-user.target basecoin.service -Also=basecoin.service - diff --git a/build/cosmos-sdk/etc/systemd/system/cosmos-sdk-server.service b/build/cosmos-sdk/etc/systemd/system/cosmos-sdk-server.service new file mode 100644 index 000000000..85fd602cf --- /dev/null +++ b/build/cosmos-sdk/etc/systemd/system/cosmos-sdk-server.service @@ -0,0 +1,23 @@ +[Unit] +Description=Cosmos SDK Basecoin Tendermint server +Requires=network-online.target +BindTo=cosmos-sdk.service +PartOf=cosmos-sdk.service +After=network-online.target cosmos-sdk.service +PropagatesReloadTo=cosmos-sdk.service +ReloadPropagatedFrom=cosmos-sdk.service + +[Service] +Environment="TMHOME=/etc/basecoin/tendermint" +Restart=on-failure +User=basecoin +Group=basecoin +PermissionsStartOnly=true +ExecStart=/usr/bin/tendermint node +ExecReload=/bin/kill -HUP $MAINPID +KillSignal=SIGTERM + +[Install] +WantedBy=multi-user.target cosmos-sdk.service +Also=cosmos-sdk.service + diff --git a/build/cosmos-sdk/etc/systemd/system/basecoin.service b/build/cosmos-sdk/etc/systemd/system/cosmos-sdk.service similarity index 71% rename from build/cosmos-sdk/etc/systemd/system/basecoin.service rename to build/cosmos-sdk/etc/systemd/system/cosmos-sdk.service index f806ef481..13de3b13a 100644 --- a/build/cosmos-sdk/etc/systemd/system/basecoin.service +++ b/build/cosmos-sdk/etc/systemd/system/cosmos-sdk.service @@ -1,17 +1,17 @@ [Unit] -Description=Basecoin +Description=Cosmos-SDK Basecoin #propagates activation, deactivation and activation fails. Requires=network-online.target #propagates activation, deactivation, activation fails and stops BindTo=basecoin-server.service #propagates stop and restart (one-way) -PartOf=basecoin-server.service +PartOf=cosmos-sdk-server.service #order -Before=basecoin-server.service +Before=cosmos-sdk-server.service After=network-online.target #propagates reload -PropagatesReloadTo=basecoin-server.service -ReloadPropagatedFrom=basecoin-server.service +PropagatesReloadTo=cosmos-sdk-server.service +ReloadPropagatedFrom=cosmos-sdk-server.service [Service] Environment="BCHOME=/etc/basecoin" @@ -25,5 +25,5 @@ KillSignal=SIGTERM [Install] WantedBy=multi-user.target -Also=basecoin-server.service +Also=cosmos-sdk-server.service