Skip to content

Instantly share code, notes, and snippets.

@RichAyotte
Last active November 26, 2018 13:20
Show Gist options
  • Save RichAyotte/0094f66569568959b5728b60f0be386a to your computer and use it in GitHub Desktop.
Save RichAyotte/0094f66569568959b5728b60f0be386a to your computer and use it in GitHub Desktop.
Update Tezos systemd
#!/bin/bash
# @Author: Richard Ayotte
# @Date: 2018-11-26 08:10:54
# @Last Modified by: rich
# @Last Modified time: 2018-11-26 08:11:35
SYSTEMDPATH=/etc/systemd/system
OLDVERSION=002-PsYLVpVv
NEWVERSION=003-PsddFKi3
APPS=("baker" "endorser" "accuser")
for app in "${APPS[@]}"
do
sed -i "s/tezos-$app-$OLDVERSION/tezos-$app-$NEWVERSION/g" $SYSTEMDPATH/tezos-$app.service
systemctl enable "tezos-$app.service"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment