management scripts
This commit is contained in:
parent
76ce75a523
commit
21dbe7ab29
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
for config in ./env/*.sh
|
||||
do
|
||||
asset=$(basename "$config" .sh)
|
||||
systemctl $1 raven-taker-$asset
|
||||
done
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
for config in ./env/*.sh
|
||||
do
|
||||
asset=$(basename "$config" .sh)
|
||||
[[ $asset == "_shared" ]] && continue
|
||||
./scripts/service-template.sh $asset >/lib/systemd/system/raven-taker-$asset.service
|
||||
systemctl enable raven-taker-$asset
|
||||
done
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ~/.nvm/nvm.sh
|
||||
source env.sh
|
||||
source env/$1.sh
|
||||
yarn ts-node src/taker.ts
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat << EOF
|
||||
[Unit]
|
||||
Description=raven taker $1
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=max
|
||||
ExecStart=$PWD/scripts/raven-taker.sh $1
|
||||
WorkingDirectory=$PWD
|
||||
Restart=on-failure
|
||||
RestartSec=60
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
Loading…
Reference in New Issue